Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

CharlesW's avatar

Gulp errors with fresh install

Hello,

I'm setting up a new project with a fresh Spark install, and I get this error when I try to use Gulp:

[14:22:31] Using gulpfile ~/Projects/***/gulpfile.js
[14:22:31] Starting 'all'...
[14:22:31] Starting 'less'...
[14:22:31] 'less' errored after 11 ms
[14:22:31] Error: Cannot find module './src/init'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/Users/Charles/Projects/***/node_modules/gulp-sourcemaps/index.js:4:9)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
[14:22:31] 'all' errored after 14 ms
[14:22:31] Error in plugin 'run-sequence(less)'
Message:
    Cannot find module './src/init'
Details:
    code: MODULE_NOT_FOUND
Stack:
Error: Cannot find module './src/init'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/Users/Charles/Projects/***/node_modules/gulp-sourcemaps/index.js:4:9)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)

I've done this…

rm -rf node_modules
npm install

…but it didn't fix anything.

npm list shows that init is installed:

├─┬ [email protected]
│ └── [email protected]

I'm not sure what to do next. Any thoughts appreciated!

— Charles

0 likes
4 replies
CharlesW's avatar

See? I didn't even know it was an Elixir problem. Thank you. :O)

willvincent's avatar

@CharlesW it's not.. The specific cause remains to be determined, it might be associated with the gulp-sourcemaps plugin, but that might just be the code encountering and thus throwing the error. :)

CharlesW's avatar
CharlesW
OP
Best Answer
Level 2

The specific cause remains to be determined, it might be associated with the gulp-sourcemaps plugin…

Yep, it appears to be. I copied in the src folder from the gulp-sourcemaps repo to the gulp-sourcemaps folder in node_modules, and all is well.

Thank you for the lead!

Please or to participate in this conversation.