I recently set up a new vuejs project and got it configured without any issues. However, when I started implementing code that used the await
feature, I encountered a problem after compiling (yarn run serve
). The error message that appeared is as follows:
This dependency was not found:
* regenerator-runtime/runtime.js in ./src/repositories/auth-repository.ts, ./src/store/modules/auth.ts and 2 others
To install it, you can run: npm install --save regenerator-runtime/runtime.js
I've gone through various similar threads looking for a solution, but none of them seem to work for me (including manual installation of babel plugins, installing regenerator, and adding a plugins
section into the babel.config.js file - like the one mentioned here).
Here are my configuration files:
babel.config.js
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
package.json
{
"name": "my-project",
"version": "0.1.0",
"private": true,
...
(content of package.json omitted for brevity)
vue.config.js
module.exports = {
transpileDependencies: [
'vuetify'
]
}
tsconfig.json
{
"compilerOptions": {
...
(content of tsconfig.json omitted for brevity)
},
"include": [
...
(include paths omitted for brevity)
],
"exclude": [
"node_modules"
]
}