最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - ParcelJS bundling error - favicon.ico: Invalid Version: undefined - Stack Overflow

programmeradmin3浏览0评论

This is the first time I am using ParcelJS. I npm it following their instruction everything looks good. So it would be the latest version. As soon as I run it against my project (a .html file with some js and css attached to it), I get this error.

favicon.ico: Invalid Version: undefined

I have tried to ask Google without much luck. Got any ideas?

This is the first time I am using ParcelJS. I npm it following their instruction everything looks good. So it would be the latest version. As soon as I run it against my project (a .html file with some js and css attached to it), I get this error.

favicon.ico: Invalid Version: undefined

I have tried to ask Google without much luck. Got any ideas?

Share Improve this question asked Mar 3, 2021 at 3:42 TomTom 16.2k15 gold badges74 silver badges115 bronze badges
Add a comment  | 

4 Answers 4

Reset to default 22

If you are using Parcel version 1.12.4 this github issue is the reason why you got this error. It's not your fault.

You may try to pin your Parcel version as 1.12.3 in package.json:

"dependencies": {
  "parcel": "1.12.3"
},

If your Parcel is installed globally, you may check your version of Parcel:

parcel --version
1.12.4

Uninstall 1.12.4 and reinstall 1.12.3:

npm uninstall -g parcel-bundler
npm install -g [email protected]

I had the same error and first I installed "@babel/preset-env": "^7.13.8" and it worked properly.

In my case, I had the quite similar error because my IDE accidentally imported a non-existent module. I had been suffering for a few hours, before I noticed that Т_Т So if decisions don't solve your problem, maybe it will be your case. Just check imports

TypeError: Invalid Version: undefined at new SemVer 

The Parcel lead's recommendation in the GitHub issue is to move to v2

npm uninstall -g parcel-bundler
npm install -g parcel
发布评论

评论列表(0)

  1. 暂无评论