question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Cannot find module 'internal/util/types'

See original GitHub issue

I’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:closed
  • Created 5 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
xuqiang1227commented, Jul 10, 2018

My solution is to update vinyl-fs

2reactions
fabbcommented, Jul 9, 2018

Update your dependencies, so you can use graceful-fs >=4. npm ls helps to find bad dependencies, for us it were old versions of gulp and gulp-typescript.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find module 'internal/util/types' - node.js - Stack Overflow
Simply removing the entire npm folder under C:\Users\<myusername>\AppData\Roaming\npm solved the issue. The latest npm installs these scripts in ...
Read more >
Error loading version latest: Error: Cannot find module 'internal ...
GitBook 2.6.9 has been installed $ gitbook install Error loading version latest: Error: Cannot find module 'internal/util/types' at Function ...
Read more >
Node.js – Cannot find module 'internal/util/types' - iTecNote
When i run node app.js i am getting following error ... Details:Error: Cannot find module 'internal/util/types' at Function.Module.
Read more >
cannot find module [Node npm Error Solved] - freeCodeCamp
you're trying to import an item from a module you don't have installed in your project directory; you're importing some things from an...
Read more >
module.js:538 Error: Cannot find module 'internal/util/types'
It's probably the version of node you are running (8.9.0). Both the authoring tool and the framework support the LTS version of Node...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found