skip to Main Content

I’m getting this error when I try to run npm start:

module.js:545
throw err;
^

Error: Cannot find module './Gulp'
at Function.Module._resolveFilename (module.js:543:15)
at Function.Module._load (module.js:470:25)
at Module.require (module.js:593:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/var/www/html/xocolatl/xocolatl/barrel/barrel-shopify/node_modules/@barrelny/cli/lib/builder.js:6:14)
at Module._compile (module.js:649:30)
at Object.Module._extensions..js (module.js:660:10)
at Module.load (module.js:561:32)
at tryModuleLoad (module.js:501:12)
at Function.Module._load (module.js:493:3)

I’ve run npm install prior to this, and I’ve installed gulp both globally and locally.

Node version: 9.8.0
Npm version: 6.5.0
Gulp versions:
[20:47:56] CLI version 2.0.1
[20:47:56] Local version 4.0.0

I’m not sure why I’m getting this error. I’ve tried deleting node_modules and running npm install again, but that hasn’t helped.

2

Answers


  1. Chosen as BEST ANSWER

    Looks like I had to change ./Gulp to ./gulp in the 3rd party module where it was being called from. That got rid of the error. I found the file by running grep -rl "/Gulp" *


  2. It seems that you call gulp package in your current directory. Remove ./
    With that way, nodejs will search for the package in the node_modules rather than the current directory.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search