Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not resolve "@babel/runtime/helpers... #877

Open
mityaua opened this issue Nov 6, 2024 · 0 comments
Open

Could not resolve "@babel/runtime/helpers... #877

mityaua opened this issue Nov 6, 2024 · 0 comments

Comments

@mityaua
Copy link

mityaua commented Nov 6, 2024

My app doesn't start without @babel/runtime library when I use vue-avatar-cropper. But in other projects the application runs without this library. How can I get rid of this dependency?

Could not resolve "@babel/runtime/helpers/slicedToArray"

    node_modules/vue-avatar-cropper/dist/avatar-cropper.esm.js:1:13:
      1 │ import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/asyncToGenerator";import r from"@babel/runt...
        ╵              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "@babel/runtime/helpers/slicedToArray" as external to exclude it from the
  bundle, which will remove this error and leave the unresolved path in the bundle.

X [ERROR] Could not resolve "@babel/runtime/helpers/asyncToGenerator"

    node_modules/vue-avatar-cropper/dist/avatar-cropper.esm.js:1:65:
      1 │ ...runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/asyncToGenerator";import r from"@babel/runtime/regenerator";i...
        ╵                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "@babel/runtime/helpers/asyncToGenerator" as external to exclude it from the
  bundle, which will remove this error and leave the unresolved path in the bundle.

X [ERROR] Could not resolve "@babel/runtime/regenerator"

    node_modules/vue-avatar-cropper/dist/avatar-cropper.esm.js:1:120:
      1 │ ...bel/runtime/helpers/asyncToGenerator";import r from"@babel/runtime/regenerator";import"cropperjs/dist/cropper.css";import a from"...
        ╵                                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "@babel/runtime/regenerator" as external to exclude it from the bundle,
  which will remove this error and leave the unresolved path in the bundle.

app\node_modules\esbuild\lib\main.js:1472
  let error = new Error(text);
              ^

Error: Build failed with 3 errors:
node_modules/vue-avatar-cropper/dist/avatar-cropper.esm.js:1:13: ERROR: Could not resolve "@babel/runtime/helpers/slicedToArray"
node_modules/vue-avatar-cropper/dist/avatar-cropper.esm.js:1:65: ERROR: Could not resolve "@babel/runtime/helpers/asyncToGenerator"
node_modules/vue-avatar-cropper/dist/avatar-cropper.esm.js:1:120: ERROR: Could not resolve "@babel/runtime/regenerator"
    at failureErrorWithLog (app\node_modules\esbuild\lib\main.js:1472:15)    
    at app\node_modules\esbuild\lib\main.js:945:25
    at app\node_modules\esbuild\lib\main.js:1353:9
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errors: [Getter/Setter],
  warnings: [Getter/Setter]
}

Node.js v20.16.0

"vue": "^3.4.38",
"vue-avatar-cropper": "^6.1.1",
"typescript": "~5.4.5",
"vite": "^5.4.10",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant