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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parcel not working with node 11.0.0 #2245

Closed
yichuan1118 opened this issue Nov 3, 2018 · 21 comments Β· Fixed by #2337
Closed

Parcel not working with node 11.0.0 #2245

yichuan1118 opened this issue Nov 3, 2018 · 21 comments Β· Fixed by #2337

Comments

@yichuan1118
Copy link

yichuan1118 commented Nov 3, 2018

πŸ› bug report

Parcel not working with node 11.0.0

πŸ€” Expected Behavior

parcel index.html works fine

😯 Current Behavior

(node:19941) UnhandledPromiseRejectionWarning: Error: Could not locate the bindings file. Tried:
β†’ /usr/local/lib/node_modules/parcel-bundler/node_modules/deasync/build/deasync.node
β†’ /usr/local/lib/node_modules/parcel-bundler/node_modules/deasync/build/Debug/deasync.node
β†’ /usr/local/lib/node_modules/parcel-bundler/node_modules/deasync/build/Release/deasync.node
β†’ /usr/local/lib/node_modules/parcel-bundler/node_modules/deasync/out/Debug/deasync.node
β†’ /usr/local/lib/node_modules/parcel-bundler/node_modules/deasync/Debug/deasync.node
β†’ /usr/local/lib/node_modules/parcel-bundler/node_modules/deasync/out/Release/deasync.node
β†’ /usr/local/lib/node_modules/parcel-bundler/node_modules/deasync/Release/deasync.node
β†’ /usr/local/lib/node_modules/parcel-bundler/node_modules/deasync/build/default/deasync.node
β†’ /usr/local/lib/node_modules/parcel-bundler/node_modules/deasync/compiled/11.0.0/darwin/x64/deasync.node
at bindings (/usr/local/lib/node_modules/parcel-bundler/node_modules/bindings/bindings.js:88:9)
at /usr/local/lib/node_modules/parcel-bundler/node_modules/deasync/index.js:34:32
at Object. (/usr/local/lib/node_modules/parcel-bundler/node_modules/deasync/index.js:76:2)
at Module._compile (/usr/local/lib/node_modules/parcel-bundler/node_modules/v8-compile-cache/v8-compile-cache.js:178:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:718:10)
at Module.load (internal/modules/cjs/loader.js:605:32)
at tryModuleLoad (internal/modules/cjs/loader.js:544:12)
at Function.Module._load (internal/modules/cjs/loader.js:536:3)
at Module.require (internal/modules/cjs/loader.js:643:17)
at require (/usr/local/lib/node_modules/parcel-bundler/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
(node:19941) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:19941) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

🌍 Your Environment

Software Version(s)
Parcel 1.10.3
Node 11.0.0
npm/Yarn 6.4.1
Operating System osx 10.13.2
@Hoishin
Copy link

Hoishin commented Nov 3, 2018

@yichuan1118 Does it work on v11.1.0?

@mateuszlewko
Copy link

It doesn't. I just tested with npm 6.4.1.

@jestarray
Copy link

jestarray commented Nov 3, 2018

On Linux I just reinstall with --unsafe-perm flag.

sudo npm install parcel-bundler --unsafe-perm=true --allow-root

@DeMoorJasper
Copy link
Member

DeMoorJasper commented Nov 3, 2018

This is an issue with the deasync dependency, this will be removed in the future as it is only used for a deprecated feature inside parcel that is only there for backwards compatibility for plugins.

Probably missing pre-compiled binaries for Deasync, we had a similar issue with Node 10 when it just became stable

@nicoandresr
Copy link

+1 here don't works...

Software Version(s)
Parcel 1.10.3
Node 11.1.0
npm 6.4.1
Operating System Arch Linux

Some workaround?

@jestarray
Copy link

@nicoandresr
woops, i forgot the --allow-root flag. I run arch too and that worked for me.

@23d1
Copy link

23d1 commented Nov 7, 2018

Had the same issue on macOS after updating npm. Uninstalled and reinstalled Parcel and it worked again (I'm assuming after getting all the correct dependencies and so forth during installation).

@nicoandresr
Copy link

nicoandresr commented Nov 8, 2018

@jestarray, don't work I got the same error of deasync :(

Edit:

Works after of remove node_modules and run: sudo npm i --unsafe-perm=true --allow-root

Thank u @jestarray πŸ’―

@hmaesta
Copy link

hmaesta commented Nov 13, 2018

After several approaches trying to solve this, that's what worked:

  1. Uninstall: sudo npm uninstall -g parcel-bundler
  2. Install with yarn: yarn global add parcel-bundler πŸ˜…

@devongovett
Copy link
Member

Looks like deasync has been updated. Perhaps we just need to bump the dependency in parcel?

@peteraba
Copy link

Unfortunately the workaround doesn't work for me, because of building a different dependency fails. Any progress on this would be very welcome.

@high1
Copy link

high1 commented May 4, 2019

@devongovett Huh, not sure if I should've opened another bug, but this is happening again on node 12 - deasync 0.1.15 is out, so if you could upgrade...

@mischnic
Copy link
Member

mischnic commented May 4, 2019

@high1 In the meantime, you should also be able to get version 0.1.15 if you run yarn upgrade deasync (or some npm equivalent) or do an install without a lock file.

@filipeferreira-dev
Copy link

  1. sudo npm uninstall -g parcel-bundler

It`s works to me too

@esaramago
Copy link

esaramago commented Mar 15, 2020

I fixed the issue by reinstalling Parcel globally:

npm install -g parcel-bundler

@DevTash
Copy link

DevTash commented Mar 29, 2020

Fixed by reinstalling parcel although I didn't need to install globally. For context I'm running "parcel": "^2.0.0-alpha.3.2"

npm i -D parcel@next

@scottburch
Copy link

scottburch commented Jun 1, 2020

The way I solve this is not to load parcel-bundler globally, but to run the one loaded into the project yarn parcel ....

You can also put it in the package.json and it will just work.

{"scripts": {"build": "parcel ...."}} then yarn build

I don't like to load dependencies globally.

@hypo-thesis
Copy link

Fixed by reinstalling parcel although I didn't need to install globally. For context I'm running "parcel": "^2.0.0-alpha.3.2"

npm i -D parcel@next

This is what saved me

@vthiagossilva
Copy link

2. yarn global add parcel-bundler

Works great for me in Arch Linux. Thanks!

@tuanluu-agilityio
Copy link

After several approaches trying to solve this, that's what worked:

1. Uninstall: `sudo npm uninstall -g parcel-bundler`

2. Install with yarn: `yarn global add parcel-bundler` πŸ˜…

Works like a charm! Thanks

@xuansining
Copy link

xuansining commented Dec 9, 2021

i have the same issue in windows os, node -v 16
use
npx parcel index.html
it will work in windows os

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

Successfully merging a pull request may close this issue.