module已经装了但仍提示找不到的解决方法

Posted xiaoyeblog

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了module已经装了但仍提示找不到的解决方法相关的知识,希望对你有一定的参考价值。

今天遇到的问题:(这里只是个例子)

技术图片

技术图片


 

解决方法:

npm clean cache --force

删了node_modules 和 package-lock ,然后npm install

如果再不行,看看这个modulle所需要的npm啊什么鬼的版本是否符合你电脑的版本。

不符合就升级。

这里推荐一个最好的,最省心的方法:

首先打开Windows PowerShell 软件(以管理员打开),然后:执行下列所有命令去升级!

Windows PowerShell
版权所有 (C) Microsoft Corporation。保留所有权利。

PS C:\\Windows\\system32> Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
PS C:\\Windows\\system32> npm install -g npm-windows-upgrade
F:\\nodejs\\npm-windows-upgrade -> F:\\nodejs\\node_modules\\npm-windows-upgrade\\bin\\npm-windows-upgrade.js
+ npm-windows-upgrade@6.0.1
added 72 packages in 14.766s
PS C:\\Windows\\system32> npm-windows-upgrade
npm-windows-upgrade v6.0.1
? Which version do you want to install? 6.10.2
Checked system for npm installation:
According to PowerShell: F:\\nodejs
According to npm:        F:\\nodejs
Decided that npm is installed in F:\\nodejs
Upgrading npm... /

Upgrading npm (fallback method)... 
You wanted to install npm 6.10.2, but the installed version is 6.9.0.

A common reason is an attempted "npm install npm" or "npm upgrade npm". As of today, the only solution is to completely uninstall and then reinstall Node.js. For a small tutorial, please see https://github.com/felixrieseberg/npm-windows-upgrade#usage.

Please consider reporting your trouble to https://aka.ms/npm-issues.

Debug Information:

http_parser: 2.8.0 | node: 8.11.0 | v8: 6.2.414.50 | uv: 1.19.1 | zlib: 1.2.11 | ares: 1.10.1-DEV | modules: 57 | nghttp2: 1.25.0 | openssl: 1.0.2o | icu: 60.1 | unicode: 10.0 | cldr: 32.0 | tz: 2017c | os: win32 x64


PS C:\\Windows\\system32> npm-windows-upgrade -p -v latest
npm-windows-upgrade v6.0.1
Checked system for npm installation:
According to PowerShell: C:\\Users\\XiaoYe\\AppData\\Roaming\\npm
According to npm:        F:\\nodejs
Decided that npm is installed in C:\\Users\\XiaoYe\\AppData\\Roaming\\npm
Upgrading npm...


Upgrade finished. Your new npm version is 6.10.3. Have a nice day!
PS C:\\Windows\\system32>

成功升级,然后再试一下

npm clean cache --force

删了node_modules 和 package-lock ,然后npm install,然后npm run dev看看。 

以上是关于module已经装了但仍提示找不到的解决方法的主要内容,如果未能解决你的问题,请参考以下文章

Microsoft OLEDB Provider for Oracle 找不到,怎么解决

vscode提示找不到module

No module named * 但是已经安装了找不到解决办法

由于找不到网络,未能映射驱动器解决方法

模块qtcore.dll已经加载,但找不到入口点怎么解决

卸载应用后,删除安装根目录下的所有文件,提示已在另一进程打开,在资源管理器进程中找不到该程序的解决