Error: cannot find module npm-shrinkwrap - node.js

Setting up bootstrap with grunt.
Getting the following error:
Cannot find module npm-shrinkwrap
Tried npm install shrinkwrap, still getting the same error.

run npm install first on bower_components\bootstrap directory. Then, run grunt dist.

Related

Error: Cannot find module 'gulp-webserver'

When I running the node.js project with gulp. I'm getting "Error: Cannot find module 'gulp-webserver'". Re-wrote the connection with below but still its same.
$ npm install --save-dev gulp-webserver
Issue was with the existance of the web server.
Solution: Go to gulp location within your solution and use below..Solved!
$ npm install --save-dev gulp-webserver
This would be usefull..enter link description here

Error: Cannot find module 'pretty-bytes'

I am getting Error: Cannot find module 'pretty-bytes' error on my mac machine when I do yo gulp-angular.
Not able to run gulp serve after getting this error
When you have a Error: Cannot find module it means that you're trying to require a package that is not installed yet.
Open a terminal then cd in your project root. When you're in your projet root you can install the module by executing npm install pretty-bytes.
You should also consider adding it to your package.json file either in the dependencies or the devDependencies.

grunt-bower-task throws "Warning: Cannot find module 'bower' Use --force to continue."

When doing grunt bower:install grunt throws the following error
kaushiks-MacBook-Pro:ama ghost$ grunt bower:install
Running "bower:install" (bower) task
Warning: Cannot find module 'bower' Use --force to continue.
Aborted due to warnings.
kaushiks-MacBook-Pro:ama ghost$
I have tried npm install bower -g but still din't work. Please help.
You probably need Bower as a local dependency and not global. If you are using grunt-bower-task you should've downloaded Bower from its dependencies already - but since the error specifically says that it cannot find module bower you should install it locally in your project's root with npm install bower -D.
The -D option is shorthand for --save-dev which only installs the dependency if NODE_ENV environment variable is development, which it is by default.

How to install qunitjs with git on Karma's?

I'm trying to work around this error in karma.
QUnit has comitted a fix for the error since v1.14.0, so I want to install qunit from git to work with karma-qunit.
npm rm qunitjs
npm i jquery/qunit
Then I run karma and I get an error, even though ./node_modules/qunitjs is present with a package.json file:
$ ./node_modules/karma/bin/karma start
module.js:340
throw err;
^
Error: Cannot find module 'qunitjs'
at Function.Module._resolveFilename (module.js:338:15)
at Function.require.resolve (module.js:384:19)
at initQUnit (/home/nik/src/dmt/node_modules/karma-qunit/lib/index.js:7:39)
at Array.invoke [as 0] (/home/nik/src/dmt/node_modules/karma/node_modules/di/lib/injector.js:75:15)
at get (/home/nik/src/dmt/node_modules/karma/node_modules/di/lib/injector.js:48:43)
at /home/nik/src/dmt/node_modules/karma/lib/server.js:31:14
at Array.forEach (native)
at start (/home/nik/src/dmt/node_modules/karma/lib/server.js:30:21)
at invoke (/home/nik/src/dmt/node_modules/karma/node_modules/di/lib/injector.js:75:15)
at Object.exports.start (/home/nik/src/dmt/node_modules/karma/lib/server.js:306:12)
The error doesn't occur when installing qunit with npm install qunitjs. Anyone know what's going on?
I'm using npm 1.4.16 and node 0.10.25.
Make this folders tree :
./node_modules/
./node_modules/
./qunitjs/
./karma/
Or use npm in karma folder './node_modules/karma/bin/' or './node_modules/karma/'.
cd /home/nik/src/dmt/node_modules/karma/bin/
npm i jquery/qunit
Finally worked this issue out. Turns out I had to install qunitjs globally before it worked.
npm install -g qunitjs
Don't like the solution as it will break module dependancy (for other developers), but seems the only way it worked for me.
I do have Karma installed (via npm) globally too, so maybe that's why.

I'm cloning a repo with Yeoman, what configuration do I need on my computer?

I have cloned a repo that has Yeoman installed.
I installed node, as well as Yeoman npm i -g yo. When I run grunt I get an error stating:
Error: Cannot find module 'load-grunt-tasks'
Warning: Task "default" not found. Use --force to continue.
What else do I need to do to be able to run this repo successfully?
The first time, you have to run npm install.
This will install all the needed dependencies as described in the package.json
Subsequently, if anyone add a new dependency into this file, you will need to run npm install or npm update again.
Actually besides npm, you should also download bower dependencies.
So it's 2-step:
npm install
bower install
If you don't invoke bower application may launch, but later you may encounter problems such as the lack of libraries.

Resources