2

I am new with angular 5 , Currently i have updated my project which was in angular 2 to 5 , but while i am running npm install command i am getting following error .

fs.js:646
return binding.open(pathModule._makeLong(path), stringToFlags(flags), 
mode);
             ^

Error: ENOENT: no such file or directory, open 
'/home/bijay/projects/project_name/config/Config.d.ts'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.writeFileSync (fs.js:1299:33)
at Object.<anonymous> (/home/bijay/projects/project_name/node_modules/node-config-ts/src/createTypedefs.js:14:4)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)

So I am not able to get what is the issue. And if i run npm install with Sudo it is working without any error.

Bijay Kumar Rai
  • 77
  • 1
  • 10
  • I think you may have issue with file and directory naming conventions. Your dir may be have "_" or others symbol, you only can use characters and numbers. – Nitin Pund Mar 25 '18 at 12:10

2 Answers2

0

var notesString = fs.readFileSync('notes-data.json');

no such file or directory, open

your directory place is empty or wrong

yousef
  • 1
  • 1
-1

I had a very similar error. Downgrading from npm version 6.1.0 to 6.0.1 with the following command solved the error for me:

npm i npm@6.0.1 -g
Mohammad Kanan
  • 4,452
  • 10
  • 23
  • 47