Command Sh Vue Cli Service Build C

Posted on  by admin

Not the answer you're looking for? Browse other questions tagged vuejs2aws-amplifyvue-cli or ask your own question.

Node: v8.12.0, NPM: 6.4.1. I'm having an error while running the newly created pwa template from Vue.JS 3. The command that I'm using is npm run serve. I'm expecting to run my pwa template. Having error that says. The error says,. code ELIFECYCLEnpm ERR!

errno 126npm ERR! [email protected] serve: vue-cli-service servenpm ERR! Exit status 126npm ERR!npm ERR!

Failed at the [email protected] serve script.npm ERR!

This is probably not a problem with npm. There is likely additional logging output above. A complete log of this run can be found in:npm ERR!

Here's the full log from 2018-09-25T07_17_36_807Z-debug.log file.

Modified17 days ago. I'm trying to setup an existing vue project and getting this error.

on windows I was able to resolve it by deleting the "node_modules" folder and reinstalling it but here in linux nothing works, deleting it or even reinstalling the dependencies.

Not the answer you're looking for? Browse other questions tagged vue.jsvue-cli or ask your own question.

Below is the contents of the error log.

77 gold badges2929 silver badges6969 bronze badges. 6969 bronze badges. That's because your dependence is not installed. 33 gold badges1919 silver badges3939 bronze badges.

3939 bronze badges. Removing node_modules folder along with package-lock.json file and running fresh npm install worked for me. (Found solution here: https://github.com/vuejs/vue-cli/issues/2404#issuecomment-443397971).

In case if moving to different/new OS environment - might also be that no vue-cli is installed, then install vue-cli as per instructions in the official guide.

11 gold badge3333 silver badges3636 bronze badges. 3636 bronze badges. Make sure to npm install after npm i @vue/cli, especially if you have Typescript. There may be additional Typescript libraries necessary after installing @vue/cli. 11 gold badge1010 silver badges2121 bronze badges. 2121 bronze badges.

NB

uninstall vue/cli with npm uninstall -g @vue/cli. install vue/cli again with npm install -g @vue/cli (you may also try it with sudo, like sudo npm install -g @vue/cli). Probably you have a problem with your babel.config.js file.Open it and chek out the path!

In my case, the path was wrong!This will solve your problem for 90%.

  • At first it was.. And, I found my mistake in PLUGINS and changed it as you see below. It woked perfectly! It should be PLUGIN not PLUGINS.

  • I think this mistake happened when I used refactor(rename). In your case names can be different but if you find it. You will solve the problem!

  • 6969 bronze badges. Modified1 year, 2 months ago. I am developing application in Vue.js 2. I am using Ubuntu 20.04.1 LTS. My package.json file looks like this:.

Steps to reproduce

When I run npm run build, I get the following exception:. However, when I run npm run serve, everything works fine. What is wrong here?

Version

If you need any additional files that I didn't include, please let me know. 11 gold badge1111 silver badges3333 bronze badges. 3333 bronze badges. I found out what the error was. I was trying to read some file content in vue.config.js like so:.

After removing fs.readJsonSync(..), it started working.

What is actually happening?

11 gold badge1111 silver badges3333 bronze badges. 3333 bronze badges. Modified1 month ago. I am trying to deploy an vue app in AWS amplify.

Below is my build configuration-.

My package.json in the vue app -. In the build step it's failing, so I pulled up the log and saw following error-.

2020-03-25T06:37:48.522Z [WARNING]: sh: vue-cli-service: command not found. vue-cli-service is there in the dev dependencies.

33 gold badges2929 silver badges5454 bronze badges. 5454 bronze badges.

Node and OS info

  • A quick fix that did work for me is to install @vue/cli-service globally with this command npm install -g @vue/cli-service. Also make sure your npm install command runs in NODE_ENV=development otherwise devDependencies won't be installed.

  • Amaury BrisouAmaury Brisou. You may want to use npm ci or to trash your node_modules, at least once just as a test.

What is expected?

Seems like most CICD systems hitting this issue were resolved by destroying the node_modules artifact: https://github.com/vuejs/vue-cli/issues/2404. Is the vue-cli-service not intended only to be used for development?

Amplify is not going to serve your content from that service, its a development dependency which you would use to run locally during development.

I think you don't want a "start" script there at all as Amplify would look in your public folder and serve the index.html file there.

Configuration without Ejecting #

Action DanAction Dan.

However, we also understand that it's impossible to cater to every possible need, and the needs of a project may also change over time. Projects created by Vue CLI allow you to configure almost every aspect of the tooling without ever needing to eject. Check out the Config Reference for more details.