Error: Cannot find module 'internal/util/types'
See original GitHub issueI’ve tried several different solutions online to fix this problem. Mostly reinstalling node and npm.
I also tried installing the latest graceful-fs with npm install -g graceful-fs graceful-fs@latest
.
Some solutions say to sit tight unless it’s causing a problem. In my case, it’s causing problems.
I’m getting the following error.
Error: Cannot find module 'internal/util/types'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
at Function.Module._load (internal/modules/cjs/loader.js:475:25)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at evalmachine.<anonymous>:31:26
at Object.<anonymous> (C:\tfs\MRCS\MRCS-DEV-image_viewer\MRCS.Web\node_modules\gulp\node_modules\vinyl-fs\node_modules\graceful-fs\fs.js:11:1)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
This error happens with any gulp command from the gulp file.
Versions: gulp: 3.9.1 npm: 5.6.0 node: 9.11.1 (although, I used 8.11.1 as well)
If I go to node version 6.2.2 then that fixed the problem. But, most people said that they download 6.2.2 and then redownload the latest and everything works fine. In my case, if I upgrade to 8.11.1 again, then stuff breaks.
Note: I also ran npm cache verify
and npm install
after the upgrade.
What should I do?
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (2 by maintainers)
Top GitHub Comments
My solution is to update
vinyl-fs
。Update your dependencies, so you can use graceful-fs >=4.
npm ls
helps to find bad dependencies, for us it were old versions ofgulp
andgulp-typescript
.