简体   繁体   English

该系统找不到指定的路径。 内部/模块/cjs/loader.js:834

[英]The system cannot find the path specified. internal/modules/cjs/loader.js:834

im working on a project using vuejs cli and when i type this in the terminal 'npm run serve' it should give me a localhost to past in a browser to view my work but i keep getting multiple errors:我正在使用 vuejs cli 处理一个项目,当我在终端“npm run serve”中输入它时,它应该给我一个本地主机,可以在浏览器中过去以查看我的工作,但我不断收到多个错误:

> root@0.1.0 serve E:\MILAD\VUE.JS\TRAINING & projects\log in CLI
> vue-cli-service serve

The system cannot find the path specified.
internal/modules/cjs/loader.js:834
 throw err;
 ^

Error: Cannot find module 'E:\MILAD\VUE.JS\@vue\cli-service\bin\vue-cli-service.js'
   at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15)
   at Function.Module._load (internal/modules/cjs/loader.js:687:27)
   at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
   at internal/main/run_main_module.js:17:47 {
 code: 'MODULE_NOT_FOUND',
 requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! root@0.1.0 serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the root@0.1.0 serve 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\Bannourah Gang\AppData\Roaming\npm-cache\_logs\2020-10-15T00_03_44_083Z-debug.log

and something saying: This is probably not a problem with npm.还有一句话说:这可能不是 npm 的问题。 There is likely additional logging output above.上面可能有额外的日志输出。

i dont know what that means and i dont know why i appears.我不知道那是什么意思,也不知道我为什么出现。 thanks in advance.提前致谢。

The issue is because it is not able to find the .js file inside the folder.问题是因为它无法在文件夹中找到 .js 文件。 Even I faced the same issue and I fixed it, below are the steps which I performed即使我遇到了同样的问题并修复了它,以下是我执行的步骤

  1. download notepad++下载记事本++
  2. Open nodepad++ -> file -> new -> write your code -> save with ".js" extension("save as Type" must be javaScript file)打开 nodepad++ -> 文件 -> 新建 -> 编写你的代码 -> 以“.js”扩展名保存(“另存为类型”必须是 javaScript 文件)
  3. open cmd-> node "fileName.js"打开 cmd-> 节点“fileName.js”

Screenshot截屏

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

相关问题 找不到模块:内部/模块/cjs/loader.js:969 - Cannot find module: internal/modules/cjs/loader.js:969 在反应应用程序中运行 npm start 后,我​​有这个错误:internal/modules/cjs/loader.js:834 - After running npm start in react application I have this error: internal/modules/cjs/loader.js:834 内部/模块/cjs/loader.js:968 抛出错误; ^ 错误:找不到模块“../../temp” - internal/modules/cjs/loader.js:968 throw err; ^ Error: Cannot find module '../../temp' 内部/模块/cjs/loader.js:905 抛出错误; ^ 错误:找不到模块“cors” - internal/modules/cjs/loader.js:905 throw err; ^ Error: Cannot find module 'cors' dotenv throw err internal/modules/cjs/loader.js:800 找不到模块 - dotenv throw err internal/modules/cjs/loader.js:800 cant find modules 内部/模块/cjs/loader.js:800 抛出错误 - internal/modules/cjs/loader.js:800 throw err 内部/模块/cjs/loader.js:582 抛出错误 - internal/modules/cjs/loader.js:582 throw err 内部/模块/cjs/loader.js:883 抛出错误; - internal/modules/cjs/loader.js:883 throw err; 内部/模块/cjs/loader.js:888 抛出错误; - internal/modules/cjs/loader.js:888 throw err; internal/modules/cjs/loader.js:960 错误:找不到模块'C:\Users\Sanjai\AppData\Roaming\npm\node_modules\protractor\bin\protractor' - internal/modules/cjs/loader.js:960 Error: Cannot find module 'C:\Users\Sanjai\AppData\Roaming\npm\node_modules\protractor\bin\protractor'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM