❯ gulp scss-lint
dyld: lazy symbol binding failed: Symbol not found: _node_module_register
Referenced from: /Users/kevinsuttle/Code/XXX/node_modules/browser-sync/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build/Release/bufferutil.node
Expected in: dynamic lookup
dyld: Symbol not found: _node_module_register
Referenced from: /Users/kevinsuttle/Code/XXX/node_modules/browser-sync/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build/Release/bufferutil.node
Expected in: dynamic lookup
zsh: trace trap gulp scss-lint
No idea. This happens no matter what gulp task I run, and none of them depend on my browsers-sync task. In fact, it still happens even when I comment that task out.
Gulpfile
gulp.task('scss-lint', function() {
gulp.src('/scss/*.scss')
.pipe(scss-lint());
});
package.json
"devDependencies": {
"browser-sync": "^2.0.1",
"del": "^1.1.1",
"gulp": "^3.8.11",
"gulp-sass": "^1.3.2",
"gulp-scss-lint": "^0.1.6",
"gulp-size": "^1.2.0",
"psi": "^1.0.5",
"run-sequence": "^1.0.2",
"w3cjs": "^0.2.0"
}
I've had some weird issues with nvm lately. Wondering if that has something to do with it.
❯ node -v
v0.10.36
I deleted the browser-sync directory from node_modules. Then tried another gulp task.
❯ gulp watch
Error: Cannot find module 'browser-sync'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Users/kevinsuttle/Code/XXX/gulpfile.js:8:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
Gulpfile.js
gulp.task('watch', function () {
gulp.watch('_sass/*.scss', ['styles']);
});
Deleted references to browser-sync in my package.json and gulpfile.
I uninstalled globally and locally in npm.
❯ npm uninstall -g browser-sync
npm WARN uninstall not installed in /Users/kevinsuttle/.nvm/v0.10.36/lib/node_modules: "browser-sync"
~/Code/XXX master*
❯ npm uninstall browser-sync
npm WARN uninstall not installed in /Users/kevinsuttle/Code/XXX/node_modules: "browser-sync"
❯ gulp watch
ReferenceError: browserSync is not defined
at Object.<anonymous> (/Users/kevinsuttle/Code/XXX/gulpfile.js:8:10)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Liftoff.handleArguments (/usr/local/lib/node_modules/gulp/bin/gulp.js:116:3)
at Liftoff.<anonymous> (/usr/local/lib/node_modules/gulp/node_modules/liftoff/index.js:159:12)
at module.exports (/usr/local/lib/node_modules/gulp/node_modules/liftoff/node_modules/flagged-respawn/index.js:17:3)
Did you try delete the node_modules folder and run npm install again?
Because I had to do that right after I changed my node version with n.
Solution by @joaovpmamede worked for me. Thanks.
I think it was an issue of a global vs local reference in the package.json. Resolved now.
+@joaovpmamede this worked for me, thanks. Shoutout to my boy @zthornto for keeping it real
@joaovpmamede Your solution works for me. Thanks.
@joaovpmamede works for me. thks.
@joaovpmamede Your solution works for me too.
Thanks
I solved this problem by downgrading to node 4 LTS from 6
Most helpful comment
Did you try delete the node_modules folder and run npm install again?
Because I had to do that right after I changed my node version with n.