angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

run ng show error

Open fayeyen opened this issue 9 years ago • 3 comments

I run ng showing error as below module.js:538 throw err; ^

Error: Cannot find module '/Users/admin/package.json' at Function.Module._resolveFilename (module.js:536:15) at Function.Module._load (module.js:466:25) at Module.require (module.js:579:17) at require (internal/module.js:11:18) at Object. (/Users/admin/.npm-global/lib/node_modules/@angular/cli/bin/ng:94:30) at Module._compile (module.js:635:30) at Object.Module._extensions..js (module.js:646:10) at Module.load (module.js:554:32) at tryModuleLoad (module.js:497:12) at Function.Module._load (module.js:489:3)

I try uninstall and reinstall node+npm then install angular/cli , still with the same problem

fayeyen avatar Nov 29 '17 22:11 fayeyen

Can You give package.json content ? I think the problem is inside this file

Gardemarin avatar Nov 30 '17 07:11 Gardemarin

@Gardemarin don't have the package.json but I have package-lock.json

fayeyen avatar Nov 30 '17 10:11 fayeyen

it's work now, I add the path at .bash_profile export PATH=/Users/admin/.npm-global/bin:$PATH Angular CLI: 1.5.4 Node: 8.9.1 OS: darwin x64 Angular:

fayeyen avatar Nov 30 '17 11:11 fayeyen