$ yo --version && bower --version && grunt --version
When i run this command I got the error shown below :
1.6.0
1.7.7
grunt-cli v0.1.13
module.js:341
throw err;
^
Error: Cannot find module './schema/safe'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (C:\Users\IBM_ADMIN\node_modules\grunt\node_modules\js-yaml\lib\js-yaml\loader.js:8:22)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
How to resolve this issue?
Related
I am not able to run npm start am getting the below error
E:\angular2\projects2018\angularFlex>npm install
> node-sass#4.7.2 install E:\angular2\projects2018\angularFlex\node_modules\node-sass
> node scripts/install.js
module.js:471
throw err;
^
Error: Cannot find module 'true-case-path'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (E:\angular2\projects2018\angularFlex\node_modules\node-sass\lib\extensions.js:11:22)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
You might want to update your nodejs & npm, i just installed 9.4.0 (npm 5.4.2) and its fixed!
When trying npm start or ng serve it shows the error like this :
The "#angular/compiler-cli" package was not properly installed. Error: Error: Cannot find module '#angular/compiler-cli'
Error: The "#angular/compiler-cli" package was not properly installed. Error: Error: Cannot find module '#angular/compiler-cli'
at Object. (/home/jsnsree/.nvm/versions/node/v6.11.2/lib/node_modules/#angular/cli/node_modules//src/index.js:14:11)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/home/jsnsree/.nvm/versions/node/v6.11.2/lib/node_modules/#angular/cli/tasks/eject.js:10:19)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
And the ng versoin in my application shows :
#angular/cli: 1.3.2
node: 6.11.2
os: linux x64
#angular/animations: error
#angular/common: error
#angular/compiler: error
#angular/core: error
#angular/forms: error
#angular/http: error
#angular/platform-browser: error
#angular/platform-browser-dynamic: error
#angular/platform-server: error
#angular/router: error
#angular/cli: error
#angular/compiler-cli: error
I tried to remove and reinstall angular/cli but it doesn't make any changes:
Try re-installing your CLI.
npm uninstall -g #angular/cli
npm cache clean
npm install -g #angular/cli#latest
delete node_modules from your project
and run
npm install
this will work
Try this command:
npm install #angular/{animations,common,compiler,compiler-cli,core,forms,http,platform-browser,platform-browser-dynamic,platform-server,router}
Getting Following error message,I tried to fix by updating npm and reinstall of mean stack application by running npm install
Error: Cannot find module 'npm'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous>
(C:\Users\Laptop2\AppData\Roaming\npm\node_modules\mean-cli\lib\cli.js:5:7)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
Update Npm by using following command issue resolve
npm install npm#latest -g
Try:
npm install npm#latest -g
I am trying to convert my jsx code to js using babel.
babel --presets es2015,react --minified finan.js -o ./compiled/compiled.js
Error: Cannot find module 'js-tokens'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (C:\Users\Saurav\Desktop\newcode dev\untitled4\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-function-name\node_modules\babel-hel
per-function-name\node_modules\babel-traverse\node_modules\babel-code-frame\lib\index.js:50:41)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
Recently i faced the same error . Just use :
npm update
or delete babel-preset-es2015 from node_modules folder and reinstall it using
npm install
I installed npm, bower and gulp. But while running gulp app:serve, I am getting the following error.
Please help me.
This is the command I run:
sachin#sachin:~/Desktop/workspace/myproj/angular/ex (master)$gulp app:serve
Result I got:
Error: Cannot find module 'require-dir'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/sachin/Desktop/workspace/myproj/angular/ex/gulpfile.js:14:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
Error: Cannot find module 'require-dir'
You've installed gulp but have not installed its tasks' dependencies. E.g. if a gulp task has any require('') calls, then it depends on require-dir. Those dependencies are probably in your project's package.json file. To install all the dependencies run:
npm install