Tuesday, March 14, 2017

Solution for node error:Cannot find module 'internal/fs' ( for gulp )

Error scenario:

-You run gulp 
-gulp fails with exception "Cannot find module 'internal/fs'"

Probable cause:
-Your node version has been changed recently
It's likely that the gulp script would work with an older version of node. New version you installed won't work with it. There are two options here:
1. To revert to old node version
2. To reinstall node_modules

In this article, we will use option #2.

Try to delete all node modules and reinstall them. A command sequence like this would do:

npm cache clean
rm -Rf node_modules/
npm install

More information on this fix can be found here.

No comments:

Post a Comment

PSR-1 and PSR-2 coding standards for PHP

Visual aspects of code play a significant role in raising or drowning developer's productivity. In case that there's too much clutte...