Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not compatible with parcel package (only parcel-bundler) #381

Closed
fregante opened this issue Jan 13, 2020 · 16 comments 路 Fixed by #387
Closed

Not compatible with parcel package (only parcel-bundler) #381

fregante opened this issue Jan 13, 2020 · 16 comments 路 Fixed by #387

Comments

@fregante
Copy link
Contributor

馃悰 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

@open-collective-bot
Copy link

Hey @fregante 馃憢,
Thank you for opening an issue. We'll get back to you as soon as we can.
Please, consider supporting us on Open Collective. We give a special attention to issues opened by backers.
If you use Loadable at work, you can also ask your company to sponsor us 鉂わ笍.

@gregberge
Copy link
Owner

Hi, feel free to submit a PR to fix it.

@denizdogan
Copy link

@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. :)

@gregberge
Copy link
Owner

Hello @denizdogan, I have just published v5.2.0 with the fix.

@fregante
Copy link
Contributor Author

fregante commented Feb 24, 2020

This was supposed to be a breaking release. Anyone who runs npm install now will have a broken install because they don鈥檛 have parcel

I suggest releasing 5.2.1 immediately undoing this change and then 6.0.0 with this change

@gregberge
Copy link
Owner

@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.

@fregante
Copy link
Contributor Author

It is a build tool, it is not critical if it breaks

Given that build tools are used in CI/CD, today鈥檚 builds will be affected and people have to fix them to restore deployment.

It鈥檚 best to fix it now because technically it would be another breaking change for 5.2.0 users. If you change it now, there won鈥檛 be anyone who has the broken 5.2.0 in their package.json

@gregberge
Copy link
Owner

I know but right now I don't have time to do it, sorry. PR welcome.

@fregante
Copy link
Contributor Author

PR welcome for what? You just need to re-publish the old 5.1.0 as 5.2.1 and use npm deprecate on 5.2.0. It鈥檚 just local commands

@gregberge
Copy link
Owner

@fregante nop there is also a bug fix in 5.2.0.

@fregante
Copy link
Contributor Author

fregante commented Feb 24, 2020

This is all something that you can do locally. There鈥檚 no code to review, it just lengthens the process.

Anyway, it doesn鈥檛 affect me, but probably it鈥檒l ruin someone鈥檚 day

@chopfitzroy
Copy link

Should this work with Parcel 2?

@taheri24
Copy link

taheri24 commented Mar 1, 2020

parcel-bundler install latest version of this package(if not available) . please fix it faster if possible .

@denizdogan
Copy link

Was this change a mistake? Every reference I can find seems to suggest you use parcel-bundler, including the official website, not "parcel".

@gregberge
Copy link
Owner

@denizdogan we support both.

@alexeychikk
Copy link

@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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants