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

Error: Failed to load plugin 'postcss-modules' declared in '.eslintrc.js': Could not locate the bindings file. Tried: #40

Open
dhffdh opened this issue Oct 25, 2023 · 4 comments

Comments

@dhffdh
Copy link

dhffdh commented Oct 25, 2023

VSCode output of eslint plugin:

Error: Failed to load plugin 'postcss-modules' declared in '.eslintrc.js': 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/out/Debug/deasync.node
 → /node_modules/deasync/Debug/deasync.node
 → /node_modules/deasync/out/Release/deasync.node
 → /node_modules/deasync/Release/deasync.node
 → /node_modules/deasync/build/default/deasync.node
 → /node_modules/deasync/compiled/18.15.0/darwin/arm64/deasync.node
 → /node_modules/deasync/addon-build/release/install-root/deasync.node
 → /node_modules/deasync/addon-build/debug/install-root/deasync.node
 → /node_modules/deasync/addon-build/default/install-root/deasync.node
 → /node_modules/deasync/lib/binding/node-v116-darwin-arm64/deasync.node
Referenced from: /.eslintrc.js
    at bindings (/node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (/node_modules/deasync/index.js:30:31)
    at Module._compile (node:internal/modules/cjs/loader:1316:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1371:10)
    at Module.load (node:internal/modules/cjs/loader:1171:32)
    at Module._load (node:internal/modules/cjs/loader:1012:12)
    at f._load (node:electron/js2c/asar_bundle:2:13377)
    at Module.require (node:internal/modules/cjs/loader:1195:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/node_modules/eslint-plugin-postcss-modules/dist/sync.js:3:19)

environment:

  • Chip: Apple M2 Pro
  • MacOS: 13.3
  • node: v20.8.1
  • npm: 10.1.0
  • eslint: 8.49.0
  • deasync: 0.1.26
  • eslint-plugin-postcss-modules: 2.0.0

Not helped:

  • rm -r node-modules
  • npm cache clean --force
  • npm install
@bmatcuk
Copy link
Owner

bmatcuk commented Nov 4, 2023

The error "Could not locate the bindings file" seems to indicate some problem with your local node modules. If you google that error message, you'll find a ton of people asking about it, for example, this stackoverflow post.

Solution seems to be to remove your node_modules directory and reinstall, or npm rebuild.

@surdu
Copy link

surdu commented Nov 13, 2023

I've removed the node_modules folder and reinstalled everything, but having the same issue.

I suspect the issue is with the Apple M2 Pro chip. I had a lot of problem with packages that have some pre-compiled binaries, that usually don't contain also the binaries for the ARM architecture that the M2 is using.

Looking at the deasync lib, I see that is written in C++, so I'm guessing that they don't include binaries for ARM.

I'm seeing there is an issue opened there for the same issue.

@dhffdh
Copy link
Author

dhffdh commented Nov 22, 2023

Solution seems to be to remove your node_modules directory and reinstall, or npm rebuild.

I've already tried it. It doesn't help

@dhffdh
Copy link
Author

dhffdh commented Nov 22, 2023

Looking at the deasync lib, I see that is written in C++, so I'm guessing that they don't include binaries for ARM.

Try cp node_modules/deasync/bin/darwin-arm64-node-20/deasync.node node_modules/deasync/build/deasync.node
It helped me

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

No branches or pull requests

3 participants