0

I am getting an error when trying to run npm run serve. At fist I tried to work with vue in laravel project and run the "npm run serve command". After that I uninstalled vue as well as vue/cli and reinstall them again. Then i created new vue project in independent folder. But when I am trying to run server as -> npm run serve at I'm getting the same error as when i tried it in the laravel project.

I used below codes for installation:

npm run serve => the vue and laravel project
npm run dev => the laravel project

This is the error :

$ npm run serve

[email protected] serve P:\codes & projects\vue\Tutorials\vue-1 
vue-cli-service serve

'projects\vue\Tutorials\vue-1\node_modules\.bin\' is not recognized as an intern
al or external command,
operable program or batch file.
internal/modules/cjs/loader.js:1032
  throw err;
  ^

Error: Cannot find module 'P:\@vue\cli-service\bin\vue-cli-service.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1029:15)
    at Function.Module._load (internal/modules/cjs/loader.js:898:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js
:71: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! [email protected] serve: vue-cli-service serve**
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] serve script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ahmad\AppData\Roaming\npm-cache\_logs\2020-09-13T16_12_03_
919Z-debug.log

And This is an image for the error in the bash terminal :

enter image description here

6
  • 1
    Did you npm install? Commented Sep 13, 2020 at 16:25
  • yes i have npm 6.13.7 Commented Sep 13, 2020 at 16:27
  • 1
    I've meant did you run the command 'npm install' before trying to serve ? :) Commented Sep 13, 2020 at 16:43
  • yes i run the npm install command twice before and after the error and same result. Commented Sep 13, 2020 at 16:44
  • 1
    It looks like npm is trying to run vue from P:\@vue\cli-service\bin\vue-cli-service.js, so: the best person to explain why that might be is you, can you update your post to explain that? At the very least, if you're using non-standard pathing, can you explain how that's set up in your post. Commented Sep 13, 2020 at 16:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.