G-Man
G-Man

Reputation: 1435

Getting TypeError: require.extensions.hasOwnProperty is not a function after upgrading Node to latest - 9.3.0

Just in case anyone else encounters this. I searched and didn't find a duplicate in here. Apologies if there is one.

OS X Sierra 10.12.6

Getting this error when running Gulp after upgrading Node: TypeError: require.extensions.hasOwnProperty is not a function

My prior Node version was 6.x ( before v8 )

Upvotes: 3

Views: 5535

Answers (1)

G-Man
G-Man

Reputation: 1435

ran this:

rm -r node_modules/require-dir ( not sure if this is really needed )

then:

npm uninstall && npm-check-updates -g && npm install npm-check-updates -g

then got this error:

Error: Cannot find module 'require-dir'

then ran this:

npm install require-dir

Problem Solved

Upvotes: 4

Related Questions