Ece Mi
Ece Mi

Reputation: 1

I run into problems when i add ".slice()" to the line of code

I'm new to vue.js. I'm making a fast typing application.

Everything was as it should be, but when I wrote and ran this line of code, I got this error in the terminal:

**INFO Starting development server... 98% after emitting CopyPlugin ERROR Failed to compile with 1 error 23:59:37 This dependency was not found:

  • core-js/modules/es.array.slice.js in ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/Main.vue?vue&type=script&lang=js
    To install it, you can run: npm install --save core-js/modules/es.array.slice.js Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat 'C:\DumpStack.log.tmp'**

As it told me to, I ran: npm install --save core-js/modules/es.array.slice.js

Then it looks like this:

npm ERR! code ENOENT npm ERR! syscall open npm ERR! path C:\Users\user\fast-typing\core-js\modules\es.array.slice.js/package.json npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\user\fast-typing\core-js\modules\es.array.slice.js\package.json' npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\user\AppData\Local\npm-cache_logs\2022-02-06T21_06_50_092Z-debug.log

Local ekranım ise şu şekilde :

./src/components/Main.vue?vue&type=script&lang=js (./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/Main.vue?vue&type=script&lang=js) Module not found: Error: Can't resolve 'core-js/modules/es.array.slice.js' in 'C:\Users\user\fast-typing\src\components'

Note: I tried npm install --save core-js and npm install --save corejs@2 but the problem is not solved

Thanks in advance for your answers!

Upvotes: -1

Views: 338

Answers (1)

Alpcap
Alpcap

Reputation: 46

seems like you're dealing with version problems of core-js package. You can look at package.json file and check "core-js" version. Let's update core-js package via npm.

Try:

npm install [email protected]

or

npm install core-js@3

Upvotes: 1

Related Questions