我想在localhost:8080上使用npm运行我的Vue.js,但是他们给了我这个错误。有没有办法解决这个问题?
此错误仅在我尝试安装
节点
_
模块
和
package-lock.json
在我的Vue文件夹中包含
.babelrc
package.json
和
webpack.config.js
..。对于我的其他Vue文件夹,我仍然可以通过对所有文件夹使用相同的方法来运行我的localhost:8080
npm安装
npm运行开发
下面的代码就是错误。
The system cannot find the path specified.
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'C:\Users\acer\Documents\VueJs\cross-env\dist\bin\cross-env.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-cli@ dev: `cross-env NODE_ENV=development webpack-dev-server --open --inline --hot`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-cli@ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\acer\AppData\Roaming\npm-cache\_logs\2019-08-23T06_50_37_455Z-debug.log
发布于 2021-03-01 14:29:34
在卸载所有内容之前,请尝试关闭终端,然后在新的终端实例中重试
https://stackoverflow.com/questions/57621347
复制相似问题