christian.giupponi's avatar

require.extensions.hasOwnProperty is not a function

I have just updated my node installation and now every time I run gulpI get require.extensions.hasOwnProperty is not a function.

How can I solve? Does anyone have the same issue?

0 likes
8 replies
bkno's avatar

I solved this by adding this to my Laravel project's package.json in devDependencies:

"require-dir": "^0.3.2"
2 likes
timgavin's avatar

@bkno I added this but it didn't fix it for me. Am I supposed to do something after adding it? Ran: composer dump autoload but that didn't make a difference.

2n2n's avatar

Hi mine worked by checking the package.json of laravel https://github.com/laravel/laravel/blob/5.1/package.json mine indicated that it was downloading the "laravel-elixir": "^1.0.0" and found out that the repo was updated, and it should download the version "laravel-elixir": "^4.0.0" with "require-dir": "^0.3.2"

Please or to participate in this conversation.