Parcel: Parcel not working with node 11.0.0

Created on 3 Nov 2018  ยท  18Comments  ยท  Source: parcel-bundler/parcel

๐Ÿ› 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

Bug

Most helpful comment

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 ๐Ÿ˜…

All 18 comments

@yichuan1118 Does it work on v11.1.0?

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

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

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

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

+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?

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

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

@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 :100:

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 ๐Ÿ˜…

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

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

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

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

  1. sudo npm uninstall -g parcel-bundler

It`s works to me too

I fixed the issue by reinstalling Parcel globally:

npm install -g parcel-bundler

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

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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dotdash picture dotdash  ยท  3Comments

jzimmek picture jzimmek  ยท  3Comments

oliger picture oliger  ยท  3Comments

dsky1990 picture dsky1990  ยท  3Comments

donaldallen picture donaldallen  ยท  3Comments