theRAPTLab / gsgo

GEM-STEP Foundation repo migrated from GitLab June 2023
1 stars 1 forks source link

npm build errors `Error: Cannot find module 'ws'` #771

Open benloh opened 10 months ago

benloh commented 10 months ago

Joshua reports:

Image

and

lerna ERR! npm run build stderr:
sh: webpack: command not found
npm ERR! code ELIFECYCLE
benloh commented 10 months ago

Explanation

Errors like Error: Cannot find module 'ws' and sh: webpack: command not found are generally related package errors to switching between node versions. e.g. you use one version of node to run Net.Create, then switch to GEM-STEP without switching node.

Solution

A full clean should do the trick. All steps are important here!

Currently the node version should be 14.21.3.

cd gsgo
nvm use
rm -rf node_modules
npm ci
npm run bootstrap
npm run gem

Important points: