node.js - Cannot find module internal/util/types

node.js – Cannot find module internal/util/types

node.js – Cannot find module internal/util/types

I had same issue. After researching it, it looks like there are many ways that people have fix this problem.

What caused the problem for me was that I upgraded node and needed to rebuild my project.

npm rebuild

Fixed it for me.

There is a lengthy discussion here:
nodemon

Reverting to an earlier version, resolved the crash I was getting each time I run npm :

sudo n 6.12.0

Thanks to: https://github.com/remy/nodemon/issues/1124#issuecomment-345181229

node.js – Cannot find module internal/util/types

In Windows 10 I recently had error message also, running nodejs. This error would occur even if I simply ran something simple like npm --version.

I then noticed the error stack trace showed the following script in the call stack:

C:Users\AppDataRoamingnpmnode_modulesnpmnode_modulesgraceful-fsfs.js:11:1)

It turns out that an earlier version of npm had installed scripts in the users profile folder and, for some reason, that never got removed – even though I had performed many uninstalls and reinstalls of the latest nodejs version.

Simply removing the entire npm folder under C:Users<myusername>AppDataRoamingnpm solved the issue.

The latest npm installs these scripts in C:Program Filesnodejsnode_modulesnpm, which is where these should be picked up.

Related posts on internal util types :

Leave a Reply

Your email address will not be published. Required fields are marked *