Could not resolve "@babel/runtime/helpers/" functions.
Opened this issue · 1 comments
rajeshtva commented
I have installed this package in my vue 3 application, It is a client side rendered application. I followed this path.. I am working on a vite powered application. when i start my dev
server by running npm run dev
, this error occurs.
to me it looks like that entire @babel/runtime/helpers
package is missing.
How can fix this issue? or any work around ? i have stopped using this package for now.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/interopRequireDefault"
node_modules/vue-api-query/build/index.js:3:37:
3 │ ...fault = require("@babel/runtime/helpers/interopRequireDefault");
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/interopRequireDefault" as
external to exclude it from the bundle, which will remove this error. You
can also surround this "require" call with a try/catch block to handle this
failure at run-time instead of bundle-time.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/interopRequireDefault"
node_modules/vue-api-query/build/Model.js:3:37:
3 │ ...fault = require("@babel/runtime/helpers/interopRequireDefault");
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/interopRequireDefault" as
external to exclude it from the bundle, which will remove this error. You
can also surround this "require" call with a try/catch block to handle this
failure at run-time instead of bundle-time.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/classCallCheck"
node_modules/vue-api-query/build/Model.js:10:54:
10 │ ...quireDefault(require("@babel/runtime/helpers/classCallCheck"));
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/classCallCheck" as external
to exclude it from the bundle, which will remove this error. You can also
surround this "require" call with a try/catch block to handle this failure
at run-time instead of bundle-time.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/createClass"
node_modules/vue-api-query/build/Model.js:12:51:
12 │ ...pRequireDefault(require("@babel/runtime/helpers/createClass"));
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/createClass" as external to
exclude it from the bundle, which will remove this error. You can also
surround this "require" call with a try/catch block to handle this failure
at run-time instead of bundle-time.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/assertThisInitialized"
node_modules/vue-api-query/build/Model.js:14:61:
14 │ ...fault(require("@babel/runtime/helpers/assertThisInitialized"));
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/assertThisInitialized" as
external to exclude it from the bundle, which will remove this error. You
can also surround this "require" call with a try/catch block to handle this
failure at run-time instead of bundle-time.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/inherits"
node_modules/vue-api-query/build/Model.js:16:48:
16 │ ...eropRequireDefault(require("@babel/runtime/helpers/inherits"));
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/inherits" as external to
exclude it from the bundle, which will remove this error. You can also
surround this "require" call with a try/catch block to handle this failure
at run-time instead of bundle-time.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/possibleConstructorReturn"
node_modules/vue-api-query/build/Model.js:18:65:
18 │ ...t(require("@babel/runtime/helpers/possibleConstructorReturn"));
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/possibleConstructorReturn" as
external to exclude it from the bundle, which will remove this error. You
can also surround this "require" call with a try/catch block to handle this
failure at run-time instead of bundle-time.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/getPrototypeOf"
node_modules/vue-api-query/build/Model.js:20:54:
20 │ ...quireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/getPrototypeOf" as external
to exclude it from the bundle, which will remove this error. You can also
surround this "require" call with a try/catch block to handle this failure
at run-time instead of bundle-time.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/interopRequireDefault"
node_modules/vue-api-query/build/StaticModel.js:3:37:
3 │ ...fault = require("@babel/runtime/helpers/interopRequireDefault");
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/interopRequireDefault" as
external to exclude it from the bundle, which will remove this error. You
can also surround this "require" call with a try/catch block to handle this
failure at run-time instead of bundle-time.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/interopRequireDefault"
node_modules/vue-api-query/build/Builder.js:3:37:
3 │ ...fault = require("@babel/runtime/helpers/interopRequireDefault");
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/interopRequireDefault" as
external to exclude it from the bundle, which will remove this error. You
can also surround this "require" call with a try/catch block to handle this
failure at run-time instead of bundle-time.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/classCallCheck"
node_modules/vue-api-query/build/StaticModel.js:10:54:
10 │ ...quireDefault(require("@babel/runtime/helpers/classCallCheck"));
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/classCallCheck" as external
to exclude it from the bundle, which will remove this error. You can also
surround this "require" call with a try/catch block to handle this failure
at run-time instead of bundle-time.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/createClass"
node_modules/vue-api-query/build/StaticModel.js:12:51:
12 │ ...pRequireDefault(require("@babel/runtime/helpers/createClass"));
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/createClass" as external to
exclude it from the bundle, which will remove this error. You can also
surround this "require" call with a try/catch block to handle this failure
at run-time instead of bundle-time.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/defineProperty"
node_modules/vue-api-query/build/Builder.js:10:54:
10 │ ...quireDefault(require("@babel/runtime/helpers/defineProperty"));
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/defineProperty" as external
to exclude it from the bundle, which will remove this error. You can also
surround this "require" call with a try/catch block to handle this failure
at run-time instead of bundle-time.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/slicedToArray"
node_modules/vue-api-query/build/Builder.js:12:53:
12 │ ...equireDefault(require("@babel/runtime/helpers/slicedToArray"));
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/slicedToArray" as external to
exclude it from the bundle, which will remove this error. You can also
surround this "require" call with a try/catch block to handle this failure
at run-time instead of bundle-time.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/typeof"
node_modules/vue-api-query/build/Builder.js:14:46:
14 │ ...nteropRequireDefault(require("@babel/runtime/helpers/typeof"));
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/typeof" as external to
exclude it from the bundle, which will remove this error. You can also
surround this "require" call with a try/catch block to handle this failure
at run-time instead of bundle-time.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/classCallCheck"
node_modules/vue-api-query/build/Builder.js:16:54:
16 │ ...quireDefault(require("@babel/runtime/helpers/classCallCheck"));
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/classCallCheck" as external
to exclude it from the bundle, which will remove this error. You can also
surround this "require" call with a try/catch block to handle this failure
at run-time instead of bundle-time.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/createClass"
node_modules/vue-api-query/build/Builder.js:18:51:
18 │ ...pRequireDefault(require("@babel/runtime/helpers/createClass"));
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/createClass" as external to
exclude it from the bundle, which will remove this error. You can also
surround this "require" call with a try/catch block to handle this failure
at run-time instead of bundle-time.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/interopRequireDefault"
node_modules/vue-api-query/build/Parser.js:3:37:
3 │ ...fault = require("@babel/runtime/helpers/interopRequireDefault");
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/interopRequireDefault" as
external to exclude it from the bundle, which will remove this error. You
can also surround this "require" call with a try/catch block to handle this
failure at run-time instead of bundle-time.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/defineProperty"
node_modules/vue-api-query/build/Parser.js:10:54:
10 │ ...quireDefault(require("@babel/runtime/helpers/defineProperty"));
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/defineProperty" as external
to exclude it from the bundle, which will remove this error. You can also
surround this "require" call with a try/catch block to handle this failure
at run-time instead of bundle-time.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/classCallCheck"
node_modules/vue-api-query/build/Parser.js:12:54:
12 │ ...quireDefault(require("@babel/runtime/helpers/classCallCheck"));
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/classCallCheck" as external
to exclude it from the bundle, which will remove this error. You can also
surround this "require" call with a try/catch block to handle this failure
at run-time instead of bundle-time.
✘ [ERROR] Could not resolve "@babel/runtime/helpers/createClass"
node_modules/vue-api-query/build/Parser.js:14:51:
14 │ ...pRequireDefault(require("@babel/runtime/helpers/createClass"));
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@babel/runtime/helpers/createClass" as external to
exclude it from the bundle, which will remove this error. You can also
surround this "require" call with a try/catch block to handle this failure
at run-time instead of bundle-time.
2:00:01 PM [vite] error while updating dependencies:
Error: Build failed with 21 errors:
node_modules/vue-api-query/build/Builder.js:3:37: ERROR: Could not resolve "@babel/runtime/helpers/interopRequireDefault"
node_modules/vue-api-query/build/Builder.js:10:54: ERROR: Could not resolve "@babel/runtime/helpers/defineProperty"
node_modules/vue-api-query/build/Builder.js:12:53: ERROR: Could not resolve "@babel/runtime/helpers/slicedToArray"
node_modules/vue-api-query/build/Builder.js:14:46: ERROR: Could not resolve "@babel/runtime/helpers/typeof"
node_modules/vue-api-query/build/Builder.js:16:54: ERROR: Could not resolve "@babel/runtime/helpers/classCallCheck"
...
at failureErrorWithLog (/home/rex/rajesh/code/grablor-all/ui-new-vite/node_modules/vite/node_modules/esbuild/lib/main.js:1636:15)
at /home/rex/rajesh/code/grablor-all/ui-new-vite/node_modules/vite/node_modules/esbuild/lib/main.js:1048:25
at runOnEndCallbacks (/home/rex/rajesh/code/grablor-all/ui-new-vite/node_modules/vite/node_modules/esbuild/lib/main.js:1471:45)
at buildResponseToResult (/home/rex/rajesh/code/grablor-all/ui-new-vite/node_modules/vite/node_modules/esbuild/lib/main.js:1046:7)
at /home/rex/rajesh/code/grablor-all/ui-new-vite/node_modules/vite/node_modules/esbuild/lib/main.js:1058:9
at new Promise (<anonymous>)
at requestCallbacks.on-end (/home/rex/rajesh/code/grablor-all/ui-new-vite/node_modules/vite/node_modules/esbuild/lib/main.js:1057:54)
at handleRequest (/home/rex/rajesh/code/grablor-all/ui-new-vite/node_modules/vite/node_modules/esbuild/lib/main.js:723:19)
at handleIncomingPacket (/home/rex/rajesh/code/grablor-all/ui-new-vite/node_modules/vite/node_modules/esbuild/lib/main.js:745:7)
at Socket.readFromStdout (/home/rex/rajesh/code/grablor-all/ui-new-vite/node_modules/vite/node_modules/esbuild/lib/main.js:673:7)
lbeauvisage commented
this works for me:
npm add @babel/runtime