Cannot find module 'worker_threads'
Closed this issue · 1 comments
johnwstanford commented
Environment:
- Dell XPS 13 running Ubuntu 20.04
node --version
givesv10.19.0
yarn --version
gives1.22.17
Steps to Reproduce:
git clone https://github.com/substrate-developer-hub/substrate-front-end-template
cd substrate-front-end-template
git checkout latest
yarn install
Result:
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'worker_threads'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at /home/john/github/substrate-front-end-template/.yarn/releases/yarn-3.1.1.cjs:426:2642
at Object.<anonymous> (/home/john/github/substrate-front-end-template/.yarn/releases/yarn-3.1.1.cjs:723:7786)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
I'm following the tutorial at https://docs.substrate.io/tutorials/v3/create-your-first-substrate-chain/
From inside the repo folder, yarn --version
gives the same error as yarn install
. However, from any other folder, yarn --version
succeeds and gives the version number.
johnwstanford commented
Never mind. I looked at the tutorial more closely and it said you need at least version 14. I got NodeJS from the package manager and it was v10. I got v16 from the Node.js website and now it works.