This version of µWS is not compatible with your Node.js build: Error: node-loader. while running "truffle console"
Asked Answered
A

1

11

I'm working on a Blockchain project where I use Truffle. when I run the Truffle Console command I face this issue.

Complete Log:

This version of µWS is not compatible with your Node.js build:

Error: node-loader: Error: The specified module could not be found. C:\Users\sudda\AppData\Roaming\npm\node_modules\truffle\node_modules\ganache\dist\node/3jj9vE3p.node Falling back to a NodeJS implementation; performance may be degraded.

Package.json

{
  "name": "nft-marketplace",
  "version": "0.1.0",
  "description": "An NFT Marketplace",
  "author": "[email protected]",
  "dependencies": {
    "@metamask/detect-provider": "^1.2.0",
    "@openzeppelin/contracts": "^4.3.1",
    "babel-polyfill": "6.26.0",
    "babel-preset-env": "1.7.0",
    "babel-preset-es2015": "6.24.1",
    "babel-preset-stage-2": "6.24.1",
    "babel-preset-stage-3": "6.24.1",
    "babel-register": "6.26.0",
    "bootstrap": "4.3.1",
    "chai": "4.2.0",
    "chai-as-promised": "7.1.1",
    "chai-bignumber": "3.0.0",
    "mdb-react-ui-kit": "^1.3.0",
    "mdb-ui-kit": "^3.9.0",
    "react": "16.8.4",
    "react-bootstrap": "1.0.0-beta.5",
    "react-dom": "16.8.4",
    "react-scripts": "2.1.3",
    "truffle": "5.0.5",
    "web3": "1.0.0-beta.55"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
  ]
}

My node version is 16.14.0.

How I can remove this error/warning.

Apologize answered 11/2, 2022 at 14:28 Comment(3)
Can you confirm that you are using node version 16? This warning is caused by Ganache but only occurs (as far as I've ever seen) on node 12.Rhombus
Yes. I'm sure that the version is 16, further I checked on 14.18.1. It gives me the same error.Apologize
try following this #71810543 @FrankieExpiatory
W
8

This happened to me with v19.1.0 while I run

truffle deploy --network goerli

I switched to

nvm install --lts  # if version '--lts' is not yet installed.
nvm use --lts

Now using node v18.12.1 (npm v8.19.2)

problem is resolved

Warden answered 4/12, 2022 at 19:26 Comment(4)
This is the correct & the best answer.Faith
what does it follows to nvm use --lts?Dismissal
@IesusDaveSanz Long Term Support. you can read details: brainspire.com/blog/…Warden
Best answer, just reinstall using nvm install --lts and run nvm alias default 18, then everything is working. Switch from node v20.3.0 to v18.16.0. Thanks.Mod

© 2022 - 2024 — McMap. All rights reserved.