Vue-cli: Error when I use async/await: regenerator-runtime/runtime was not found

Created on 19 Sep 2018  Â·  5Comments  Â·  Source: vuejs/vue-cli

Version

3.0.3

Reproduction link

https://github.com/veah/blogs

Node and OS info

Node 8.9.4 / NPM 5.8.0/ Mac OS

Steps to reproduce

  1. download
  2. npm install
  3. npm run serve

What is expected?

Everything goes well

What is actually happening?

Error in command line:

This dependency was not found:

regenerator-runtime/runtime in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/HelloWorld.vue?vue&type=script&lang=js&

I thought regenerator-runtime has already been installed in ./node_modules/@vue/babel-preset-app. Shouldn't this regenerator-runtime be found in @vue/babel-preset-app ?

needs team repro cli-service serve

Most helpful comment

Removing node_modules & package-lock.json and rerunning npm install fixes this issue.

All 5 comments

Removing node_modules & package-lock.json and rerunning npm install fixes this issue.

Removing node_modules & package-lock.json and rerunning npm install fixes this issue.

Great, it works, thx

RT, this issue happen suddently. It is so weired.

Yeah, nuking package-lock.json and updating all versions just to fix this probably isn't the best idea. Not sure why that is so upvoted.

Deleting node_modules and package-lock.json did not fix it for me. I'm using pnpm, maybe its stricter handling of dependencies caused that not to work? I did pnpm i --save regenerator-runtime and that fixed it (I tried pnpm install --save regenerator-runtime/runtime as indicated by the error message but that failed to install).

Was this page helpful?
0 / 5 - 0 ratings