0

I'm getting the following issue all the time while going to run my project. Even after downgraded my node version to 8.4.0 (npm version 5.3.0) still getting the same issue. I know there are so many solutions given like after removing the node_modules to run npm cache clean --force and then again npm install but this solution is not working as well.

PFB, the error:

npm start

m> subhojits-components@0.0.1 start 
/home/subhojit/Desktop/my_project
> node server/index

Unspecified environment, booting dev server
Booting dev server....
module.js:491
throw err;
^

Error: Cannot find module 'internal/fs'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at evalmachine.<anonymous>:40:20
at Object.<anonymous> 
(/home/subhojit/Desktop/my_project/node_modules/express- 
handlebars/node_modules/graceful-fs/fs.js:11:1)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! subhojits-components@0.0.1 start: `node server/index`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the subhojits-components@0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely 
additional logging output above.

Please let me know if there are anymore solutions. Any help would be appreciated.

Note: I'm using graceful-fs version 4.0.0

Subhojit
  • 1,389
  • 8
  • 19
  • 33
  • Possible duplicate of [Cannot find module 'internal/fs' after upgrading to node 7](https://stackoverflow.com/questions/40308623/cannot-find-module-internal-fs-after-upgrading-to-node-7) – Sachin Shah Apr 29 '19 at 09:06
  • that i also know its a possible duplicate of that question but I tried with that solution as well but its not working – Subhojit Apr 29 '19 at 09:08

2 Answers2

0

hi please import the graceful-fs library

like

import {userDefinedName} from 'graceful-fs';

hope it will help you.

or Click On the below Link.

graceful-fs

0

I have seen this error on external Apple engine.

Uninstalling the currently active version of node.js with nvm

So uninstall npm:

nvm deactivate
nvm uninstall <<version>>

Install stable version

nvm install <<version>>
nvm install 10.15.3

Install Angular/Cli (exemple)

npm install @angular/cli
npm link @angular/cli

Wish, it works.

Gromph
  • 123
  • 12