Reputation:
I download loopback project from github and trying to run it . When I type npm start I am getting following errors in console window .
C:\Users\Khundokar Nirjor\Desktop\loop4\loopback4-example-shopping> npm start
> [email protected] prestart C:\Users\Khundokar Nirjor\Desktop\loop4\loopback4-example-shopping
> npm run build
> [email protected] build C:\Users\Khundokar Nirjor\Desktop\loop4\loopback4-example-shopping
> lerna run build
internal/modules/cjs/loader.js:628
throw err;
^
Error: Cannot find module 'C:\node_modules\npm\bin\npm-cli.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:625:15)
at Function.Module._load (internal/modules/cjs/loader.js:527:27)
at Function.Module.runMain (internal/modules/cjs/loader.js:839:10)
at internal/main/run_main_module.js:17:11 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Upvotes: 2
Views: 9958
Reputation: 1
You need to install typescript locally.
yarn global add typescript
Upvotes: 0
Reputation: 773
Are you doing "npm install" command before npm start?
Any project you are cloning from git it won't have node_modules(which is having necessary library to run that application).
While "npm install" command, it will download all the required libraries based on your package.json/package-lock.json.
If already you run "npm install", you can fix this issue using below command
npm i npm-cli --save
Upvotes: 4