npm install is missing modules - node.js

Before I can run gulp in my project I need to run npm install. This works except on my computer, because I get the following error:
Error: Cannot find module 'socket.io'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
...
I can fix this with
$> npm install socket.io
Now when I do the install command again I get
Error: Cannot find module 'di'
...
When I install di and run the install command again I get:
Error: Cannot find module 'log4js'
I think that this might continue for a very long time. Any suggestions what is going on here and how to fix this ?

I've faced the same problem when bootstrapping a MEAN application and add each missing dependencie with npm install packageName --save was not an option so I came across to npm-install-missing whom has saved my life :)
Installation
npm install -g npm-install-missing
Usage
npm-install-missing

Running npm install will install all dependencies that are specified in the package.json. Seems like you have quite a few dependencies that are not defined that way. Use npm install packageName --save and npm will add the package to your package.json.

I am using the same version of npm/node. Sometimes, it is like npm is "lost". What I suggest is :
rm of your node modules (at least the one that is concerned)
npm cache clean
run "npm install" several times, until all dependencies are resolved and no message are displayed

It seems that gulp need 'karma' dependencies (socket.io ,di ,log4js...) so you will have to run :
npm install karma
so just runing this command solved the problem, and all should be good, the same thing happens with grunt as well for some reasons.

This worked for me. By commenting 3 lines in C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js.
Refer [https://flaviocopes.com/cb-apply-not-a-function/]
// fs.stat = statFix(fs.stat) # Line: 61
// fs.fstat = statFix(fs.fstat) # Line: 62
// fs.lstat = statFix(fs.lstat) # Line: 63

Beside other answers, if you are using Angular and cannot make new angular project and hangs, you can get into the folder and open terminal and write:
npm -i
Maybe useful for other things too!!

I think the npm module madge would help you find the missing dependencies. It goes through your actual code and makes a list of all the dependencies found within. You could then do an npm i for each of the modules found.

If the npm-install-missing does not work for you, knowing the name of the Packages that are missing will help you out here. All I had to do was first open my package.json file inside VSCode, then paste or type the names of the missing modules into it (under dependencies) according to the way other package names were written there.
Then I ran npm install after that.
This method is helpful when you are working on a file but somehow you did not get the package.json file or some of the modules are not listed therein.
Remember to stop and restart a running server after you do npm install for your new dependencies to reflect on your work.

Upgrade your npm version
Install nvm which is easier to switch node js versions
For me node 12.18.3 worked
Just do: nvm use 12.18.3 to switch version
run npm install again and node_modules will appear

To resolve missing npm modules run:
sudo npm install -g npm-install-missing

Related

node js npm package installation not completed

I try to install node js npm packages, but It start to install and unfortunately freezes. I also try to install angular packages and it doesn't any problem. please help to fix this issue.
node version is 12.13.1;
npm version is 6.12.1;
I tried to install packages this way
npm i html-to-xlsx
here is a result:
another installation result:
Try the following commands then re-run the command:
npm cache clean --force
npm cache verify
And make sure you are in a place with good internet connection. Sometimes this is the issue.
I found way to fix this issue. I add -g before package name
npm install -g html-to-xlsx
Everything looks good
After that I enter this path C:\Users{USERNAME}\AppData\Roaming\npm\node_modules and copy needful module into my working folder

This version of Node.js requires NODE_MODULE_VERSION 70 [duplicate]

I am running a node application on terminal. Have recently upgraded to node v8.5.0, but am getting this error:
Error: The module '/tidee/tidee-au/packages/tidee-au-server/node_modules/bcrypt/lib/binding/bcrypt_lib.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 51. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at Object.Module._extensions..node (module.js:653:18)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
at Module.require (module.js:568:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/tidee/tidee-au/packages/tidee-au-server/node_modules/bcrypt/bcrypt.js:6:16)
at Module._compile (module.js:624:30)
at Module._extensions..js (module.js:635:10)
at Object.require.extensions.(anonymous function) [as .js] (/tidee/tidee-au/packages/tidee-au-server/node_modules/babel-register/lib/node.js:152:7)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
at Module.require (module.js:568:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/tidee/tidee-au/packages/tidee-au-server/server/helpers/encryptPass.js:1:16)
Any idea how to solve this?
You need to remove the module folder (bcrypt) from the node_modules folder and reinstall it, use the following commands:
$ rm -rf node_modules/bcrypt
$ npm install
// or
$ yarn
I had the same problem and nothing mentioned here worked for me.
Here is what worked for me:
Require all dependencies you need in the main.js file that is run by electron. (this seemed to be the first important part for me)
Run npm i -D electron-rebuild to add the electron-rebuild package
Remove the node-modules folder, as well as the packages-lock.json file.
Run npm i to install all modules.
Run ./node_modules/.bin/electron-rebuild (.\node_modules\.bin\electron-rebuild.cmd for Windows) to rebuild everything
It is very important to run ./node_modules/.bin/electron-rebuild directly after npm i otherwise it did not work on my mac.
You have to rebuild the package and tell npm to update it's binary too. Try:
npm rebuild bcrypt --update-binary
#robertklep answered a relative question with this command, look.
Only rebuild haven't solved my problem, this works fine in my application.
Simply run:
npm uninstall bcrypt
Followed by:
npm install bcrypt (or npm install, if bcrypt is declared as dependency in your package.json file)
Be sure you only have one version of NodeJS installed. Try these two:
node --version
sudo node --version
I initially installed NodeJS from source, but it was the incorrect version and 'upgraded' to the newest version using nvm, which doesn't remove any previous versions, and only installs the desired version in the /root/.nvm/versions/... directory. So sudo node was still pointing to the previous version, whilst node was pointing to the newer version.
you can see this link
to check your node verison right. using
NODE_MODULE_VERSION 51 means that your node version is nodejs v7.x, requires NODE_MODULE_VERSION 57 means you need upgrade your node to v8.x,so you need to upgrade your node. and then you need run npm rebuild command to rebuild your project
Most likely you have this issue due to the package-lock.json. Somehow it seems to block you from recompiling or rebuilding your dependencies, even if you explicitly run npm rebuild. I ran all the following to fix it for me:
rm package-lock.json;
rm -rf node_modules;
npm install;
I deleted the node_modules folder and run npm install and my application started without any errors.
I got the same error but I was trying to run a node application using a Docker container.
I fixed it by adding a .dockerignore file to ignore the node_modules directory to make sure that when the docker image builds, it builds the native packages for the image I wanted (Alpine) instead of copying over the node_modules compiled for my host (Debian).
Turns out my problem was user-error: make sure the version of node you are using for running is the same that you are using when running an npm install or yarn.
I use NVM for versioning node and was running yarn via a terminal, but my IDE was set to use an older version of node when running and it was throwing the error above. Matching my IDE's version of node in the run config to node --version fixed the issue.
Here is what worked for me. I am using looped-back node module with Electron Js and faced this issue. After trying many things following worked for me.
In your package.json file in the scripts add following lines:
...
"scripts": {
"start": "electron .",
"rebuild": "electron-rebuild"
},
...
And then run following command npm run rebuild
I got this error when running my app with systemd:
ExecStart=/usr/local/bin/node /srv/myapp/server.js
But I was using a different version for npm install in the shell:
$ which node
/home/keith/.nvm/versions/node/v8.9.0/bin/node
If this is your setup, you can either hardcode the node version in the service file or follow a workaround like this one.
I had the same problem and none of these solutions worked and I don't know why, they worked for me in the past for similar problems.
Anyway to solve the problem I've just manually rebuild the package using node-pre-gyp
cd node_modules/bcrypt
node-pre-gyp rebuild
And everything worked as expected.
Hope this helps
you need just run this below commands:
$ rm -rf node_modules
$ rm -rf yarn.lock
$ yarn install
and finally
$ ./node_modules/.bin/electron-rebuild
don't forget to yarn add electron-rebuild if it doesn't exist in your dependencies.
For Electron modules, install electron-rebuild.
Format:
electron-rebuild -o <module_name> -v <electron version>
Example:
electron-rebuild -o myaddon -v 9.0.0-beta.6
Specify the same version that you have installed in the current directory
You might have this experience where a standard node-gyp build would report as 64, then a basic electron-rebuild would report 76, not until you add -v with exact version it bumps to actual version 80 (for 9.0.0-beta.6)
I had a similar problem with robotjs. There were some deprecated code that required node v11, but I had already compiled electron code on v12. So I got basically the same error.
Nothing here worked as I was basically trying to rebuild electron and my other dependencies into node v11 from v12.
Here is what I did (part of this is based on chitzui's answer, credit where credit is due):
Back up package.json
completely delete the node_modules folder
completely delete package_lock.json
delete package.json (will reinit later)
Close any open editors and other cmd windows that are in the project's directory.
run npm init to reinit package, then missing data with old backed up package.json
run npm i
fixed
After trying different things.
This worked.
Delete your node modules folder and run
npm i
I faced the same issue with grpc module and in my case, I was using electron and have set a wrong electron version in the env variable "export npm_config_target=1.2.3", setting it to the electron version I am using resolved the issue on my end. Hope this helps someone who set env variables as given here (https://electronjs.org/docs/tutorial/using-native-node-modules#the-npm-way)
You could remove bcrypt entirely and install bcryptjs. It is ~30% slower, but has no dependencies, so no pains installing it.
npm i -S bcryptjs && npm uninstall -S bcrypt
We've installed it successfully for our applications. We had issues with bcrypt not compiling on AWS instances for Node v8.x
Potentially, inconsistency of the node JS versions is what causes the problem. As stated in the documentation. Be sure to use one of the lts release. E.g. specify this in your Dockerfile:
# Pull lts from docker registry
FROM node:8.12.0
# ...
Check the Node version you're using, might be a mismatch between what it is expected.
I just got this error running kadence the installed "kadence" script checks for nodejs first and only runs node if there is no nodejs. I have the latest version of node linked into my ~/bin directory but nodejs runs an older version that I had forgotten to uninstall but never caused problems until just now.
So people with this problem might check if node and nodejs actually run the same version of node...
In my case, I was in my office proxy which was skipping some of the packages. When I came out of my office proxy and tried to do npm install it worked. Maybe this helps for someone.
But it took me several hours to identify that was the reason.
In my case I was running nodejs instead of node. Due to nodejs being installed by the package manager:
# which node
/home/user/.nvm/versions/node/v11.6.0/bin/node
# which nodejs
/usr/bin/nodejs
run npm config set python python2.7 and run npm install again the party is on.
I have hit this error twice in an electron app and it turned out the problem was that some modules need to be used from the main process rather than the render process. The error occurred using pdf2json and also node-canvas. Moving the code that required those modules from index.htm (the render process) to main.js (the main process) fixed the error and the app rebuilt and ran perfectly. This will not fix the problem in all cases but it is the first thing to check if you are writing an electron app and run into this error.
I came here because I was getting this error for the quokka.js ext in vscode.
My solution:
(on a mac via the terminal)
1- I went to ~/.quokka
2- I ran nano config.json
3- I copied the code from config.json into a separate file
4- I deleted the code in config.json
5- I stopped and restarted Quokka.
6- Once I confirmed that Quokka was working without errors, I deleted the config.json file code.
this is occoures because you currently change your node js version,
just run in terminal in your project
$ rm -rf node_modules/bcrypt
then reinstall
$ npm install
you can start it. ok

Node MODULE_NOT_FOUND

I just upgraded to node version 9.0.0 and am now getting this error in the command line when trying to use npm install
npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module 'internal/util/types'
I'm using:
OSX 10.10.5
Node version 9.0.0
NPM version 5.5.1
Extra information: I am also trying to do this with a Laravel 5.5 project. This is how I update my version of node: How do I update Node.js?
run
rm -rf /usr/local/lib/node_modules/npm
and then re-install Node.js will work in most cases
Leaving this here for anyone using the n nodejs version manager:
$ n 6.12.0 # Go back to a stable release
$ npm install -g npm#latest # Update npm to latest
$ n lts # Get 8.9.1
$ npm install #Should work now.
The MODULE_NOT_FOUND error seems to happen when changing between node versions and some files are possibly still being cached. I am not sure exactly but the above sequence of commands work for me.
When I first got this, I solved just running "npm install" again to make sure everything was installed.
I got similar error also on Windows 8 after I have just upgraded node js. First: how I ran into the issue then the solution that worked for me.
How I ran to the issue:
When I did npm --version and node --version I discovered that I wass running npm v3.x and node 5.x. So I went to nodejs.org site from where I downloaded node-v8.11.3-x64.msi. After installing the msi package I confirmed that my nodejs version was now v8.11.3 via node --version command.
Then, when I ran "npm install http-server" (w/o the quotes) that's when I got the issue:
npm ERR!
node v8.11.3
npm ERR! npm v3.5.3
npm ERR! code MODULE_NOT_FOUND
My resolution:
I did some research including on the internet and found out that the npm version pointed to in my path was the one in my roaming profile C:\Users[myname.hostname]\AppData\Roaming\npm. In other words, the npm being used is not the one in the updated package I have just installed which is located in C:\Program Files\nodejs.
The resolution was to delete npm and npm-cache in the roaming folder. Note, I used cygwin as I was not able to delete these folders via Windows cmd prompt. With cygwin, I navigated to
cd "C:\Users[myname.hostname]\AppData\Roaming"
Then I removed the aforementioned folders like so
rm -rf npm-cache
rm -rf npm
After that, I opened a new Windows cmd prompt and was able to now successfully install http-server like so:
npm install http-server
Hope this works for you.
For me it was package installation issue, so I just write,
npm i or npm install in the root of the application.
to open the terminal in the root of the application, if you're using VS-code right click on the package.json and click on Open in integrated terminal.
I founded this problem too, so I found that I have imported wrong module instead of express module I had imported router module after I had replaced this two my code work as well
If all the above solutions doesn’t work check for any blank spaces in your folder/file where you copied the path
Make sure you are inside the project folder.
Rename the folder "node_modules" to any other name (for example: node_modules_old).
Run command: "npm i" (the command will build new the folder node_modules).
Try running your program again.
If the problem is resolved and your program is running correct, delete the old folder node_modules.
If you are using libraries make sure to install everything with npm or yarn before starting. And in cases of you files if you are going to use them make sure to do the export.module thing everytime.
If you are working with Local modules then don't have node_modules. All things go well in a easy way.
But if you want to work with both local and node_modules then use
.mjs (extension) - For modules
.cjs (extension) - For common scripts which you want to run with node
in which you can use require statements like
var http = require('http');
var fs = require('fs');
but if using .js extension then use
import http from "http"
import fs from "fs"
And also your package.json for type
Haa well, I have spent two days on this and have done everything I can to fix this issue even tried resetting the system but none of them reloved the issue.
And accidentally found out what was causing this issue, it is because of & in my parent folder name. File hierarchy R&D>remix>blog, When I was trying to run the blog server it was throwing module not found, require stack error.
code: ←[32m'MODULE_NOT_FOUND'←[39m,
requireStack: []
Solution: I have changed the parent folder name to RnD and it fixed the issue. If the file name contains any special characters(even parent folders) try updating it. In my case, it is &
The MODULE_NOT_FOUND error happened to me and even running npm install the error persisted.
Try to do this
For me, what worked was deleting the node_modules folder
rm -r -f node_modules/
After that, run the command to install the package.json dependencies
npm install
What happened to me was that when I ran npm install for the first time I had a very low internet connection and therefore I believe that the packages from package.json were not downloaded correctly and due to that the MODULE_NOT_FOUND error occurred. The funny thing is that just running the npm install command has no effect because it understands that the package is already there but it isn't. Similar as a corrupted data. In my case the npm update was without effect too.
If when you are using React And getting this error message. You can use this ,
NPM
npm install #reduxjs/toolkit
Yarn
yarn add #reduxjs/toolkit

Node - was compiled against a different Node.js version using NODE_MODULE_VERSION 51

I am running a node application on terminal. Have recently upgraded to node v8.5.0, but am getting this error:
Error: The module '/tidee/tidee-au/packages/tidee-au-server/node_modules/bcrypt/lib/binding/bcrypt_lib.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 51. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at Object.Module._extensions..node (module.js:653:18)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
at Module.require (module.js:568:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/tidee/tidee-au/packages/tidee-au-server/node_modules/bcrypt/bcrypt.js:6:16)
at Module._compile (module.js:624:30)
at Module._extensions..js (module.js:635:10)
at Object.require.extensions.(anonymous function) [as .js] (/tidee/tidee-au/packages/tidee-au-server/node_modules/babel-register/lib/node.js:152:7)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
at Module.require (module.js:568:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/tidee/tidee-au/packages/tidee-au-server/server/helpers/encryptPass.js:1:16)
Any idea how to solve this?
You need to remove the module folder (bcrypt) from the node_modules folder and reinstall it, use the following commands:
$ rm -rf node_modules/bcrypt
$ npm install
// or
$ yarn
I had the same problem and nothing mentioned here worked for me.
Here is what worked for me:
Require all dependencies you need in the main.js file that is run by electron. (this seemed to be the first important part for me)
Run npm i -D electron-rebuild to add the electron-rebuild package
Remove the node-modules folder, as well as the packages-lock.json file.
Run npm i to install all modules.
Run ./node_modules/.bin/electron-rebuild (.\node_modules\.bin\electron-rebuild.cmd for Windows) to rebuild everything
It is very important to run ./node_modules/.bin/electron-rebuild directly after npm i otherwise it did not work on my mac.
You have to rebuild the package and tell npm to update it's binary too. Try:
npm rebuild bcrypt --update-binary
#robertklep answered a relative question with this command, look.
Only rebuild haven't solved my problem, this works fine in my application.
Simply run:
npm uninstall bcrypt
Followed by:
npm install bcrypt (or npm install, if bcrypt is declared as dependency in your package.json file)
Be sure you only have one version of NodeJS installed. Try these two:
node --version
sudo node --version
I initially installed NodeJS from source, but it was the incorrect version and 'upgraded' to the newest version using nvm, which doesn't remove any previous versions, and only installs the desired version in the /root/.nvm/versions/... directory. So sudo node was still pointing to the previous version, whilst node was pointing to the newer version.
you can see this link
to check your node verison right. using
NODE_MODULE_VERSION 51 means that your node version is nodejs v7.x, requires NODE_MODULE_VERSION 57 means you need upgrade your node to v8.x,so you need to upgrade your node. and then you need run npm rebuild command to rebuild your project
Most likely you have this issue due to the package-lock.json. Somehow it seems to block you from recompiling or rebuilding your dependencies, even if you explicitly run npm rebuild. I ran all the following to fix it for me:
rm package-lock.json;
rm -rf node_modules;
npm install;
I deleted the node_modules folder and run npm install and my application started without any errors.
I got the same error but I was trying to run a node application using a Docker container.
I fixed it by adding a .dockerignore file to ignore the node_modules directory to make sure that when the docker image builds, it builds the native packages for the image I wanted (Alpine) instead of copying over the node_modules compiled for my host (Debian).
Turns out my problem was user-error: make sure the version of node you are using for running is the same that you are using when running an npm install or yarn.
I use NVM for versioning node and was running yarn via a terminal, but my IDE was set to use an older version of node when running and it was throwing the error above. Matching my IDE's version of node in the run config to node --version fixed the issue.
Here is what worked for me. I am using looped-back node module with Electron Js and faced this issue. After trying many things following worked for me.
In your package.json file in the scripts add following lines:
...
"scripts": {
"start": "electron .",
"rebuild": "electron-rebuild"
},
...
And then run following command npm run rebuild
I got this error when running my app with systemd:
ExecStart=/usr/local/bin/node /srv/myapp/server.js
But I was using a different version for npm install in the shell:
$ which node
/home/keith/.nvm/versions/node/v8.9.0/bin/node
If this is your setup, you can either hardcode the node version in the service file or follow a workaround like this one.
I had the same problem and none of these solutions worked and I don't know why, they worked for me in the past for similar problems.
Anyway to solve the problem I've just manually rebuild the package using node-pre-gyp
cd node_modules/bcrypt
node-pre-gyp rebuild
And everything worked as expected.
Hope this helps
you need just run this below commands:
$ rm -rf node_modules
$ rm -rf yarn.lock
$ yarn install
and finally
$ ./node_modules/.bin/electron-rebuild
don't forget to yarn add electron-rebuild if it doesn't exist in your dependencies.
For Electron modules, install electron-rebuild.
Format:
electron-rebuild -o <module_name> -v <electron version>
Example:
electron-rebuild -o myaddon -v 9.0.0-beta.6
Specify the same version that you have installed in the current directory
You might have this experience where a standard node-gyp build would report as 64, then a basic electron-rebuild would report 76, not until you add -v with exact version it bumps to actual version 80 (for 9.0.0-beta.6)
I had a similar problem with robotjs. There were some deprecated code that required node v11, but I had already compiled electron code on v12. So I got basically the same error.
Nothing here worked as I was basically trying to rebuild electron and my other dependencies into node v11 from v12.
Here is what I did (part of this is based on chitzui's answer, credit where credit is due):
Back up package.json
completely delete the node_modules folder
completely delete package_lock.json
delete package.json (will reinit later)
Close any open editors and other cmd windows that are in the project's directory.
run npm init to reinit package, then missing data with old backed up package.json
run npm i
fixed
After trying different things.
This worked.
Delete your node modules folder and run
npm i
I faced the same issue with grpc module and in my case, I was using electron and have set a wrong electron version in the env variable "export npm_config_target=1.2.3", setting it to the electron version I am using resolved the issue on my end. Hope this helps someone who set env variables as given here (https://electronjs.org/docs/tutorial/using-native-node-modules#the-npm-way)
You could remove bcrypt entirely and install bcryptjs. It is ~30% slower, but has no dependencies, so no pains installing it.
npm i -S bcryptjs && npm uninstall -S bcrypt
We've installed it successfully for our applications. We had issues with bcrypt not compiling on AWS instances for Node v8.x
Potentially, inconsistency of the node JS versions is what causes the problem. As stated in the documentation. Be sure to use one of the lts release. E.g. specify this in your Dockerfile:
# Pull lts from docker registry
FROM node:8.12.0
# ...
Check the Node version you're using, might be a mismatch between what it is expected.
I just got this error running kadence the installed "kadence" script checks for nodejs first and only runs node if there is no nodejs. I have the latest version of node linked into my ~/bin directory but nodejs runs an older version that I had forgotten to uninstall but never caused problems until just now.
So people with this problem might check if node and nodejs actually run the same version of node...
In my case, I was in my office proxy which was skipping some of the packages. When I came out of my office proxy and tried to do npm install it worked. Maybe this helps for someone.
But it took me several hours to identify that was the reason.
In my case I was running nodejs instead of node. Due to nodejs being installed by the package manager:
# which node
/home/user/.nvm/versions/node/v11.6.0/bin/node
# which nodejs
/usr/bin/nodejs
run npm config set python python2.7 and run npm install again the party is on.
I have hit this error twice in an electron app and it turned out the problem was that some modules need to be used from the main process rather than the render process. The error occurred using pdf2json and also node-canvas. Moving the code that required those modules from index.htm (the render process) to main.js (the main process) fixed the error and the app rebuilt and ran perfectly. This will not fix the problem in all cases but it is the first thing to check if you are writing an electron app and run into this error.
I came here because I was getting this error for the quokka.js ext in vscode.
My solution:
(on a mac via the terminal)
1- I went to ~/.quokka
2- I ran nano config.json
3- I copied the code from config.json into a separate file
4- I deleted the code in config.json
5- I stopped and restarted Quokka.
6- Once I confirmed that Quokka was working without errors, I deleted the config.json file code.
this is occoures because you currently change your node js version,
just run in terminal in your project
$ rm -rf node_modules/bcrypt
then reinstall
$ npm install
you can start it. ok

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.

Resources