5

I have an Vuejs App using promise but get this error : This dependency was not found: core-js/fn/promise in ./src/store/index.js To install it, you can run: npm install --save core-js/fn/promise my package.json:

"dependencies": {
    "axios": "^0.21.1",
    "bootstrap": "^4.5.3",
    "core-js": "^3.6.5",
    "jquery": "^3.5.1",
    "popper.js": "^1.16.1",
    "vue": "^2.6.11",
    "vue-axios": "^3.2.2",
    "vue-router": "^3.2.0",
    "vuex": "^3.4.0"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-plugin-router": "~4.5.0",
    "@vue/cli-plugin-vuex": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/eslint-config-standard": "^5.1.2",
    "babel-eslint": "^10.1.0",
    "eslint": "^6.7.2",
    "eslint-plugin-import": "^2.20.2",
    "eslint-plugin-node": "^11.1.0",
    "eslint-plugin-promise": "^4.2.1",
    "eslint-plugin-standard": "^4.0.0",
    "eslint-plugin-vue": "^6.2.2",
    "vue-template-compiler": "^2.6.11"
  },

I run the command npm install --save core-js/fn/promise ,but nothing change

3
  • did you try npm uninstall and then re npm-install ? Commented Jan 7, 2021 at 8:29
  • no i didn't I will try Commented Jan 7, 2021 at 9:00
  • don't work again Commented Jan 7, 2021 at 9:01

4 Answers 4

18

I have the same err today, reason is import { reject } from "core-js/fn/promise", I delete it then app compiled successfully.

Sign up to request clarification or add additional context in comments.

1 Comment

It works. In my case, VSCode automatically added the import ... line.
2

Try update your core-js dependency version by:

npm install core-js
// or
yarn add core-js

The error is a result of yourProject/node_modules/core-js is not sync with your code.

You're importing core-js/fn/promise, but the build tool not found it.

Comments

1

I had a similar problem with core-js when I tried to start a Vue app, this was the error:

core-js/modules/es6.array.find in ./src/state/helpers.js,
* core-js/modules/es6.function.name 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/_base-link.vue?vue&type=script&lang=js&, ./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/_base-icon.vue?vue&type=script&lang=js& and 4 others
...
..
..

my fix was to update dependencies and my package.json after the update is the next:

{
 ...
 "dependencies": {
  "core-js": "^2.6.12",
  "vue": "2.5.16"
 },
 "devDependencies": {
  "@babel/core": "^7.14.6",
 }
}

Comments

-3

Do the following steps:

npm install name dependency,
npm install

It's perfectly running for me.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.