I'm working with Laravel 5 (Elixir) and homestead v2.5 in Ubuntu 14.10. When I typed gulp and press enter in homestead ssh, I found the following error:
Error: Cannot find module './lib/notifiers/notify-send'
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> (/home/vagrant/Code/rumta/node_modules/laravel-elixir/node_modules/gulp-notify/node_modules/node-notifier/index.js:2:12)
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)
What should I do to solved this problem?
This happened to me too with an unfinished previous installation.
A better solution I found was just removing node_modules/ folder inside my project and run again [sudo] npm install.
Hope this helps somebody else, regards!
Update Note: "sudo" is not needed, a better practice is solve permissions issue in npm following this guide
SOLVED!
Make new project and run sudo npm install.
Related
I tried to run npm install in my laravel project but got the following error.
I have also tried to upgrade npm and got the same error. I tried some of the solutions I found online but non of them helped to resolve the problem.
\AppData\Roaming\npm\node_modules\npm\node_modules\chownr\chownr.js:1
(function (exports, require, module, __filename, __dirname) {
SyntaxError: Invalid or unexpected token
at new Script (vm.js:80:7)
at createScript (vm.js:274:10)
at Object.runInThisContext (vm.js:326:10)
at Module._compile (internal/modules/cjs/loader.js:664:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
After running Gulp in cmd, I get the following error message :
module.js:549
throw err;
^
Error: Cannot find module 'laravel-elixir'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Applications/XAMPP/xamppfiles/htdocs/pmp/gulpfile.js:14:14)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
I have tried installing and uninstalling npm, it didn't work at all. Can anyone help?
Install laravel-elixir
npm install laravel-elixir
Also did you run:
npm install
If not, run that too.
cant get ionic to setup and run because of the xmlbuilder error and have tried every possibilty of trying it but no luck:
C:\Program Files (x86)\nodejs\node_modules>ionic start todo blank
Error: Cannot find module 'xmlbuilder'
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. (C:\Users\armaan\AppData\Roaming\npm\node_modules\ionic\node_modules\xml2js\lib\xml2js.js:12:13)
at Object. (C:\Users\armaan\AppData\Roaming\npm\node_modules\ionic\node_modules\xml2js\lib\xml2js.js:436:4)
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)
npm install -g xmlbuilder
just this!
hope that helps ;)
I set up a laravel/homestead environment to study the Laravel 5.1, while trying to run gulp --production command get the error below:
Error: Cannot find module 'strip-bom'
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> (/vagrant/app/node_modules/gulp/node_modules/vinyl-fs/lib/src/getContents/bufferFile.js:4:16)
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)
I've looked hard and found nothing to correct the error.
You don't have strip-bom installed. You have to install it like this.
npm install --save strip-bom
My scss won't compile in VS2013. The node-sass folder exists at the same level as the node-sass-middleware folder and has the node-sass module in it. Has anyone else seen this error? Do I need a new version of node? Does that node-sass module need to be copied somewhere else?
Error 11 module.js:340
throw err;
^
Error: Cannot find module 'node-sass'
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> (C:\Users\chris\AppData\Local\Microsoft\VisualStudio\12.0\Extensions\yiqxufal.vun\Resources\nodejs\tools\node_modules\node-sass-middleware\middleware.js:1:74)
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) 1 1
I have fixed this by install the node-sass module using npm
npm install -g node-sass
and then I copied the module into web essentials directory - from C:\Users\me\AppData\Roaming\npm\node_modules\node-sass to C:\Users\me\AppData\Local\Microsoft\VisualStudio\12.0\Extensions\[something]\Resources\nodejs\tools\node_modules\node-sass.