svgr: Not compatible with `parcel` package (only `parcel-bundler`)
๐ Bug Report
parcel is the new official name of the package, as the readme shows: https://github.com/parcel-bundler/parcel
โ ๏ธ Parser "@svgr/parcel-plugin-svgr/lib/asset.js" failed to initialize when processing asset "node_modules/@primer/octicons/build/svg/reply.svg". Threw the following error:
Error: Cannot find module 'parcel-bundler'
Require stack:
- ./refined-github/node_modules/@svgr/parcel-plugin-svgr/lib/asset.js
- ./refined-github/node_modules/parcel/src/Parser.js
- ./refined-github/node_modules/parcel/src/Pipeline.js
- ./refined-github/node_modules/parcel/src/worker.js
- ./refined-github/node_modules/@parcel/workers/src/child.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
at Function.Module._load (internal/modules/cjs/loader.js:686:27)
at Module.require (internal/modules/cjs/loader.js:848:19)
at require (./refined-github/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at Object.<anonymous> (./refined-github/node_modules/@svgr/parcel-plugin-svgr/lib/asset.js:3:22)
at Module._compile (./refined-github/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
at Module.load (internal/modules/cjs/loader.js:811:32)
at Function.Module._load (internal/modules/cjs/loader.js:723:14)
at Module.require (internal/modules/cjs/loader.js:848:19) falling back to RawAsset
To Reproduce
npm i parcel @svgr/parcel-plugin-svgr
parcel build
Try on any repo. Remove parcel-bundler and install parcel
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (10 by maintainers)
@gregberge How to configure it to work with Parcel v2? I am getting
Error: No transformers found for "D:\myrepo\src\assets\icons\folder-src-open.svg".Should this work with Parcel 2?
@fregante oh shitโฆ I will just wait for one day. If there is not lots of users impacted it should be good. It is a build tool, it is not critical if it breaks. If there are too much complaints I will publish a new 5.2.1. Sorry for that.
This was supposed to be a breaking release. Anyone who runs
npm installnow will have a broken install because they donโt haveparcelI suggest releasing
5.2.1immediately undoing this change and then6.0.0with this changeHello @denizdogan, I have just published v5.2.0 with the fix.
@gregberge Any chance that you could release this soon? Iโd really like to use this package, but there is no official release of this fix. ๐