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 1 does not work on Node v15 because it uses deasync #5294

Closed
vp2177 opened this issue Oct 28, 2020 · 8 comments
Closed

Parcel 1 does not work on Node v15 because it uses deasync #5294

vp2177 opened this issue Oct 28, 2020 · 8 comments
Labels
βœ–οΈ Non-Parcel bug Bugs related to dependencies or plugins

Comments

@vp2177
Copy link

vp2177 commented Oct 28, 2020

πŸ› bug report

> parcel src/demo/index.html --no-autoinstall --https

.../node_modules/bindings/bindings.js:126
  err = new Error(
        ^

Error: Could not locate the bindings file. Tried:
 β†’ .../node_modules/deasync/build/deasync.node
 β†’ .../node_modules/deasync/build/Debug/deasync.node
 β†’ .../node_modules/deasync/build/Release/deasync.node
 β†’ .../node_modules/deasync/compiled/15.0.1/darwin/x64/deasync.node
 β†’ .../node_modules/deasync/addon-build/release/install-root/deasync.node
 β†’ .../node_modules/deasync/lib/binding/node-v88-darwin-x64/deasync.node
    at bindings (.../node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (.../node_modules/deasync/index.js:30:31)
    at Module._compile (.../node_modules/v8-compile-cache/v8-compile-cache.js:192:30)

πŸŽ› Configuration (.babelrc, package.json, cli command)

Zero configs.

πŸ€” Expected Behavior

😯 Current Behavior

πŸ’ Possible Solution

πŸ”¦ Context

πŸ’» Code Sample

🌍 Your Environment

Software Version(s)
Parcel 1.12.4
Node 15.0.1
npm/Yarn
Operating System macOS
@john01dav
Copy link

I accidentally posted a new issue before realizing that it was a duplicate. Here is that issue's text:

This error seems to be happening again on newer parcel/node. I tried uninstalling and reinstalling, but I'm not comfortable with giving it permissions such as --allow-root and --unsafe-perms when these permissions are largely undocumented (it took several minutes to find anything at all on them, and I can't find anything that has enough detail as to what they do, and even so running something as root should probably be audited first, but I don't have time to do this right now).

Versions:

$ npm --version        
6.14.8
$ parcel --version                    
1.12.4
$ uname -r
5.9.1-arch1-1

Exact error:

$ npm run build       

> @ build <censored>
> parcel build *.html --out-dir ../frontend

/usr/lib/node_modules/parcel-bundler/node_modules/bindings/bindings.js:126
  err = new Error(
        ^

Error: Could not locate the bindings file. Tried:
 β†’ /usr/lib/node_modules/parcel-bundler/node_modules/deasync/build/deasync.node
 β†’ /usr/lib/node_modules/parcel-bundler/node_modules/deasync/build/Debug/deasync.node
 β†’ /usr/lib/node_modules/parcel-bundler/node_modules/deasync/build/Release/deasync.node
 β†’ /usr/lib/node_modules/parcel-bundler/node_modules/deasync/out/Debug/deasync.node
 β†’ /usr/lib/node_modules/parcel-bundler/node_modules/deasync/Debug/deasync.node
 β†’ /usr/lib/node_modules/parcel-bundler/node_modules/deasync/out/Release/deasync.node
 β†’ /usr/lib/node_modules/parcel-bundler/node_modules/deasync/Release/deasync.node
 β†’ /usr/lib/node_modules/parcel-bundler/node_modules/deasync/build/default/deasync.node
 β†’ /usr/lib/node_modules/parcel-bundler/node_modules/deasync/compiled/15.0.1/linux/x64/deasync.node
 β†’ /usr/lib/node_modules/parcel-bundler/node_modules/deasync/addon-build/release/install-root/deasync.node
 β†’ /usr/lib/node_modules/parcel-bundler/node_modules/deasync/addon-build/debug/install-root/deasync.node
 β†’ /usr/lib/node_modules/parcel-bundler/node_modules/deasync/addon-build/default/install-root/deasync.node
 β†’ /usr/lib/node_modules/parcel-bundler/node_modules/deasync/lib/binding/node-v88-linux-x64/deasync.node
    at bindings (/usr/lib/node_modules/parcel-bundler/node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (/usr/lib/node_modules/parcel-bundler/node_modules/deasync/index.js:30:31)
    at Module._compile (/usr/lib/node_modules/parcel-bundler/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
    at Module.load (node:internal/modules/cjs/loader:948:32)
    at Function.Module._load (node:internal/modules/cjs/loader:789:14)
    at Module.require (node:internal/modules/cjs/loader:972:19)
    at require (/usr/lib/node_modules/parcel-bundler/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/usr/lib/node_modules/parcel-bundler/src/utils/syncPromise.js:1:79)
    at Module._compile (/usr/lib/node_modules/parcel-bundler/node_modules/v8-compile-cache/v8-compile-cache.js:194:30) {
  tries: [
    '/usr/lib/node_modules/parcel-bundler/node_modules/deasync/build/deasync.node',
    '/usr/lib/node_modules/parcel-bundler/node_modules/deasync/build/Debug/deasync.node',
    '/usr/lib/node_modules/parcel-bundler/node_modules/deasync/build/Release/deasync.node',
    '/usr/lib/node_modules/parcel-bundler/node_modules/deasync/out/Debug/deasync.node',
    '/usr/lib/node_modules/parcel-bundler/node_modules/deasync/Debug/deasync.node',
    '/usr/lib/node_modules/parcel-bundler/node_modules/deasync/out/Release/deasync.node',
    '/usr/lib/node_modules/parcel-bundler/node_modules/deasync/Release/deasync.node',
    '/usr/lib/node_modules/parcel-bundler/node_modules/deasync/build/default/deasync.node',
    '/usr/lib/node_modules/parcel-bundler/node_modules/deasync/compiled/15.0.1/linux/x64/deasync.node',
    '/usr/lib/node_modules/parcel-bundler/node_modules/deasync/addon-build/release/install-root/deasync.node',
    '/usr/lib/node_modules/parcel-bundler/node_modules/deasync/addon-build/debug/install-root/deasync.node',
    '/usr/lib/node_modules/parcel-bundler/node_modules/deasync/addon-build/default/install-root/deasync.node',
    '/usr/lib/node_modules/parcel-bundler/node_modules/deasync/lib/binding/node-v88-linux-x64/deasync.node'
  ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ build: `parcel build *.html --out-dir ../frontend`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     <censored>

@DeMoorJasper DeMoorJasper changed the title Parcel does not work on Node v15 because it uses deasync Parcel 1 does not work on Node v15 because it uses deasync Nov 1, 2020
@DeMoorJasper
Copy link
Member

This is an issue with the dependency deasync, probably missing binaries here: https://github.com/abbr/deasync-bin

This isn't really a Parcel issue directly, we got rid of deasync in Parcel 2 for this reason as well as it not being totally reliable and slower than standard synchronous code. We can't easily get rid of it in Parcel 1 though as it would require a pretty large refactor. Hopefully we can release a stable Parcel 2 soonish.

@DeMoorJasper DeMoorJasper added the βœ–οΈ Non-Parcel bug Bugs related to dependencies or plugins label Nov 1, 2020
@m-w-d-d
Copy link

m-w-d-d commented Nov 5, 2020

@DeMoorJasper / @john01dav - so is the solution here to downgrade Node for the interim?

@john01dav
Copy link

@m-w-d-d I just upgraded to Parcel 2. I didn't even need to change any of my code.

@DeMoorJasper
Copy link
Member

DeMoorJasper commented Nov 5, 2020

@m-w-d-d you got 3 options really. Downgrade node, fix deasync or upgrade to parcel 2

@m-w-d-d
Copy link

m-w-d-d commented Nov 5, 2020

@DeMoorJasper / @john01dav - I might have not realised Parcel 2 was out... ahem :)

Thanks to you both!

@DeMoorJasper
Copy link
Member

This is an issue with deasync and not parcel, in Parcel 2 we stopped using this as now there's a native way to do this in node...

@AndyOGo
Copy link

AndyOGo commented Mar 31, 2022

@vp2177
@john01dav
@DeMoorJasper
@m-w-d-d

For my case the underlying problem was with deasync being unable to locate libstdc++ on my linux machine.
So I created an issue over there and it got fixed with v0.1.25.
abbr/deasync#165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
βœ–οΈ Non-Parcel bug Bugs related to dependencies or plugins
Projects
None yet
Development

No branches or pull requests

5 participants