Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find module 'dezalgo' #13492

Closed
Vladyslav93 opened this issue Jun 6, 2017 · 28 comments
Closed

Error: Cannot find module 'dezalgo' #13492

Vladyslav93 opened this issue Jun 6, 2017 · 28 comments
Labels
npm Issues and PRs related to the npm client dependency or the npm registry. question Issues that look for answers.

Comments

@Vladyslav93
Copy link

Hi.
I have next problem, when I am trying to do something with npm (install, config, etc.) I got the message:
"Error: Cannot find module 'dezalgo'". This happened every time.

node -v:6.10.3
npm -v: "Error: Cannot find module 'dezalgo'".

Had someone the same? Please help.

Thanks.

@mscdex mscdex added the npm Issues and PRs related to the npm client dependency or the npm registry. label Jun 6, 2017
@mcollina
Copy link
Member

mcollina commented Jun 6, 2017

which version of npm are you using?
npm -v will tell you.

cc @zkat

@Fishrock123
Copy link
Member

@vaibhav93 What platform are you on? If your are on Mac or Windows can you try using one of the Node.js installers to get a clean version of node and npm?

Otherwise, npm has install / uninstall instructions here: https://www.npmjs.com/package/npm

@Fishrock123 Fishrock123 added the question Issues that look for answers. label Jun 6, 2017
@zkat
Copy link
Contributor

zkat commented Jun 6, 2017

This is almost deffo a hosed npm install. That can happen for a lot of reasons :\

@Vladyslav93
Copy link
Author

@mcollina I wrote that I can´t check the version, I got the error.
@Fishrock123 I'm working on Windows. I tried to reinstall node.js, after the installation everything works but after few installation, I got the same error.

@mcollina
Copy link
Member

mcollina commented Jun 7, 2017

@Vladyslav93 as you can reinstall node to have a working environment, can you note down the npm version before it shows the problem, and then the steps needed to reproduce?

@Vladyslav93
Copy link
Author

@mcollina Yeap. Sorry)
npm -v: 5.0.3

@mcollina
Copy link
Member

mcollina commented Jun 7, 2017

@Vladyslav93 how did you install node v6 with npm@5? Have you tried to uninstalling your current version of node, cleaning up all the modules/etc, and then do a clean install of node 6 and npm@5?

Alternatively, can you try npm i npm@4 -g and see if it still shows the issue?

@Vladyslav93
Copy link
Author

@mcollina After this line, everything works for now. But I did not understand what the problem with version 5?

@Vladyslav93
Copy link
Author

image

@Fishrock123
Copy link
Member

Looks like your system failed to compile a Native C++ module.

What version of VS Studio build tools do you have? (If any?)

@Vladyslav93
Copy link
Author

@Fishrock123 I tried 2010,2012,2013,2015,2017. The same with everyone.

@Vladyslav93
Copy link
Author

Put into cmd.exe line:

SET VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140

@tskweres
Copy link

npm 5.6 throws this error, had to downgrade to 5.5.1

@mwilde345
Copy link

happened after i installed jquery package

@dtwlai
Copy link

dtwlai commented Jan 20, 2018

@mwilde345 i have also come across that situation. The way i solved was uninstalling the jquery and installing the packages that i needed. And installed back the jquery package in the end.

@ghost
Copy link

ghost commented Jan 25, 2018

Thank you @mcollina ! you saved my day :)

after this npm i npm@4 -g everything worked fine for me.

@mcollina
Copy link
Member

@samee-ch no worries, happy to help!

@zaszlo
Copy link

zaszlo commented Feb 21, 2018

Thanks for these suggestions

sudo npm install npm@4 -g
sudo npm install -g npm@5.5.1

But downgrading npm fails with the same message:

2 info using npm@5.6.0
3 info using node@v7.4.0
4 verbose stack Error: Cannot find module 'dezalgo'
4 verbose stack     at Function.Module._resolveFilename (module.js:470:15)
4 verbose stack     at Function.Module._load (module.js:418:25)
4 verbose stack     at Module.require (module.js:498:17)
4 verbose stack     at require (internal/module.js:20:19)
4 verbose stack     at Object.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/correct-mkdir.js:2:15)
4 verbose stack     at Module._compile (module.js:571:32)
4 verbose stack     at Object.Module._extensions..js (module.js:580:10)
4 verbose stack     at Module.load (module.js:488:32)
4 verbose stack     at tryModuleLoad (module.js:447:12)
4 verbose stack     at Function.Module._load (module.js:439:3)
4 verbose stack     at Module.require (module.js:498:17)
4 verbose stack     at require (internal/module.js:20:19)
4 verbose stack     at Object.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/locker.js:8:20)
4 verbose stack     at Module._compile (module.js:571:32)
4 verbose stack     at Object.Module._extensions..js (module.js:580:10)
4 verbose stack     at Module.load (module.js:488:32)
5 verbose cwd /home/laci/Dev/inventorything/inventory.angular
6 verbose Linux 4.4.0-112-generic
7 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
8 verbose node v7.4.0
9 verbose npm  v5.6.0
10 error code MODULE_NOT_FOUND
11 error Cannot find module 'dezalgo'
12 verbose exit [ 1, true ]

@ghost
Copy link

ghost commented Feb 21, 2018

@zaszlo could you please try to remove package-lock.json + node-modules and run npm install. Hopefully, it will resolve this issue.

@zaszlo
Copy link

zaszlo commented Feb 21, 2018

I purged nodejs with force :) and then reinstalled with nvm, now I don't get errors anymore :-D

@fdambrosio
Copy link

I have the same problem

@mcollina
Copy link
Member

mcollina commented Mar 2, 2018

I would recommend to open an issue to https://github.com/npm/npm with a full example to reproduce. It's not a node bug anyway.

@andreas-tornqvist
Copy link

I had the same problem, and it turned out the anti-malware program was causing it. Deactivate it and see if it works any better

@hwangzhiming
Copy link

try to instal the latest npm with npm i -g npm@latest, remove the package-lock.json, then reinstall the deps.

@mojodna
Copy link
Contributor

mojodna commented Mar 23, 2018

This sometimes happens if a package has a dependency on an older version of npm.

@jackhardy1
Copy link

if you are on npm version (global) of 5.6.0, there may be an issue.
Install npm version (global) 5.2.0, delete your node modules then reinstall and it should work

@murilo3m
Copy link

Thanks @jackhardy1 its worked for me!

@T04435
Copy link

T04435 commented Jul 26, 2018

For the solution was to:

rm -rf node_modules
npm i

On npm

npm -v 
5.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
npm Issues and PRs related to the npm client dependency or the npm registry. question Issues that look for answers.
Projects
None yet
Development

No branches or pull requests