eslint-plugin-postcss-modules icon indicating copy to clipboard operation
eslint-plugin-postcss-modules copied to clipboard

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

Open dhffdh opened this issue 2 years ago • 4 comments

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

dhffdh avatar Oct 25 '23 08:10 dhffdh

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.

bmatcuk avatar Nov 04 '23 12:11 bmatcuk

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.

surdu avatar Nov 13 '23 22:11 surdu

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 avatar Nov 22 '23 10:11 dhffdh

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

dhffdh avatar Nov 22 '23 11:11 dhffdh