简体   繁体   English

npm 安装 Node.js 后出现错误:找不到模块“es6-promisify”

[英]npm error after installing Node.js: Cannot find module 'es6-promisify'

I have installed the latets version of Node.js for Windows.我已经为 Windows 安装了 Node.js 的最新版本。 Whatever command I use I always get the same exception, ie when I type "npm -v" get this error message:无论我使用什么命令,我总是会遇到同样的异常,即当我输入“npm -v”时会收到以下错误消息:

Cannot find module 'es6-promisify'

How to install "es6-promisify" when NPM is missing "es6-promisify" in the first place?当 NPM 首先缺少“es6-promisify”时,如何安装“es6-promisify”?

BTW, during the installation of Node.js a view dependencies try to access protected foldes inside external hard drives for no reason and the last error that stuck forever was the installation of Microsoft Visual Studio Code.顺便说一句,在安装 Node.js 期间,视图依赖项尝试无缘无故地访问外部硬盘驱动器内的受保护文件夹,而最后一个永远卡住的错误是安装 Microsoft Visual Studio Code。 It seems to me that those tools cannot be installed without giving 100% access to every folder on every partition you have.在我看来,如果不授予对每个分区上每个文件夹的 100% 访问权限,就无法安装这些工具。 This seems wrong to me...这对我来说似乎是错误的......

I found out a solution to this issue.我找到了解决这个问题的方法。 I had to unplug all external drives, restart Windows, delete the folder "node_modules" manually and finally I started the Node.js msi to repair the installtion (copies files to node_modules again).我不得不拔下所有外部驱动器,重新启动 Windows,手动删除文件夹“node_modules”,最后我启动了 Node.js msi 来修复安装(再次将文件复制到 node_modules)。 After theses steps NPM is working again.在这些步骤之后 NPM 再次工作。

Remember: Reparing the installation without deleting the node_modules folder manually was not sufficient.请记住:在不手动删除 node_modules 文件夹的情况下重新安装是不够的。

Step 1: Uninstall the NodeJs app from the system Step 2: Goto the programFiles/nodejs -> delete node_modules folder Step 3: Reinstall NodeJs app第 1 步:从系统中卸载 NodeJs 应用 第 2 步:转到 programFiles/nodejs ->删除 node_modules 文件夹第 3 步:重新安装 NodeJs 应用

By following these steps you can fix the issue.通过执行这些步骤,您可以解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM