Troubleshooting the regenerator-runtime issue when utilizing Async in VueJS

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"
    ]
}

Answer №1

Give this a shot:

  1. Execute: npm install regenerator-runtime
  2. If needed: include regenerator-runtime/runtime in the same file as your async/await code.
  3. Remove node_modules and reinstall.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best method for submitting an ajax form post when it is dynamically loaded within a bootstrap modal window?

Need some help with a Bootstrap modal form that is not submitting via AJAX as intended. When the form is submitted, the entire page reloads instead of having the data posted in the background. How can I fix this while keeping the page state? Below is the c ...

Tinymce removes <html> tags from the output displayed in a textarea

I have created my own small CMS using Tinymce. When I insert plain text in pre tags, the code displays correctly on the website. However, when I update the editor, the HTML tags are removed. My Tinymce setup: <script type="text/javascript"> tinyMCE ...

Eslint was unexpectedly unable to detect any errors in the .ts files

After creating a SvelteKit project with npm create svelte@latest, I included some .ts files for a particular library. However, when running eslint ., it fails to detect any errors. The default eslint config generated from Svelte is as follows: .eslintrc. ...

Learn how to automatically update data in Vue JS after making a 'POST,' 'DELETE,' or 'PUT' request in Vue JS 2

Whenever I send a 'POST' or 'DELETE' request, the data doesn't update automatically. I have to manually reload the page to see the updated information. Is there an easy way to refresh the data after making any 'POST' / &a ...

Steps for registering a function on $rootScope when angularjs is ready

In order to make a method accessible throughout angularjs, I am looking to register it with 2 arguments (the resource id and the delete callback) using the resource provider to handle the deletion process. To properly register this method, I need angularj ...

Using Jquery to load a css background image with a loader

I am seeking suggestions on how to display a loader between button clicks while waiting for a background image to fully load. Thank you <html > <head> <script src="//code.jquery.com/jquery-1.11.0.min.js"></script> <script type= ...

What is the outcome of using VueUse.useMouse() if it is not made reactive?

Whenever I use VueUse.useMouse(), the results in console.log() change as I move the mouse. However, the results within <span></span> always remain 0. This is quite confusing to me, can someone please explain why this is happening? ...

What steps can be taken to prevent a Javascript Timeout Exception when attempting to launch a new browser window?

Recently, I have encountered an issue while running my test cases on a Linux server. Specifically, when trying to open a new window using Robot Framework, I consistently receive a Timeout Exception. This problem seems to be isolated to the server environm ...

Tips on customizing the appearance of the dropdown calendar for the ngx-daterangepicker-material package

Is there a way to customize the top, left, and width styling of the calendar? I'm struggling to find the right approach. I've been working with this date range picker. Despite trying to add classes and styles, I can't seem to update the app ...

I am unable to update an array within my component using useEffect

Encountered two problems, firstly while attempting to pass an array of objects from a parent component to a child component, facing difficulties as shown below: function DropdownSome ({options, placeholder, someNum}) { const [value, setValue] = useState ...

An error occurred while attempting to reset your password on Parse.com (JS SDK) due to an

I am having trouble resetting my password in my angularjs App. I am utilizing Parse (js SDK) as the backend. Even though I am following the documentation and using Parse.User.requestPasswordReset, I keep encountering error 125 which states invalid email ad ...

What is the procedure for altering the location of a mesh within the animate() function in three.js?

In my implementation of a three.js mesh (found in three.js-master\examples\webgl_loader_collada_keyframe.html), I have a basic setup: function init() { ... ... var sphereGeometry = new THREE.SphereGeometry( 50, 32, 16 ); var sphereMater ...

Ways to showcase logs on the user interface

After configuring a set of operations in the UI and initiating the operation, a Python script is called in the backend. It is necessary to display the logs generated by the Python script on the UI. I managed to implement this in a similar way as described ...

I am in need of a efficient loader for a slow-loading page on my website. Any recommendations on where to find one that works

I'm experiencing slow loading times on my website and I'm looking to implement a loader that will hide the page until all elements are fully loaded. I've tested several loaders, but they all seem to briefly display the page before the loader ...

Send information using AJAX within a .NET integrated browser

In our current setup, we utilize a .NET embedded browser to showcase an HTML page that is generated by applying an XSLT file to an XML file using .NET. This process results in HTML content displayed within the embedded browser through the DocumentText prop ...

Avoiding repeated execution of event handlers in subviews of Backbone

Working with Backbone, I have a list container view that should house multiple section views with event handling. However, the issue is that the event is triggered as many times as there are subviews inside the container. I understand that moving the clos ...

Basic parallax application, failing to achieve the desired impact

My goal is to create a scrolling effect where the header text moves down slightly, adding some margin on top to keep it in view. I found the perfect example of what I want to achieve with the header text at this website: After spending hours working on i ...

Can the mDNS string received through webRTC be decoded to retrieve a user's IP address?

After doing some thorough research, I came across this insightful response from a different Stack Overflow question. The problem at hand involves retrieving an mDNS string, which looks like this: abcd1234-1e1e-1e1e-1e1e-abcd1a2bc3de.local I have a genuin ...

The design of Foundation's 4 form dropdown is not displaying correctly on Internet Explorer versions 8 and below

During the development of a website using Foundation 4 framework, I encountered an issue with form dropdowns not displaying correctly on Internet Explorer 8 and older versions. Instead of using Foundation's javascript rendering, they appear as the def ...

Loss of data in the local storage when the page is reloaded

click here to see image I have managed to save data to local Storage successfully, but it keeps disappearing when I reload the page. Can someone guide me on how to handle this issue? I am new to this and would greatly appreciate any help. Thank you. https ...