简体   繁体   中英

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:

> 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. 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. 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)
  3. open cmd-> node "fileName.js"

Screenshot

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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