not able to run npm in vue project - vue.js

Though I had #vue/cli-plugin-eslint package in my dependencies, Its showing #vue/cli-plugin-eslint not found
Terminal Error:
PS C:\Users\dell\Desktop\infinity\500appsInfinity> npm run serve
500apps#0.1.0 serve
vue-cli-service serve
node:internal/modules/cjs/loader:959
throw err;
^
Error: Cannot find module '#vue/cli-plugin-eslint'
Require stack:
C:\Users\dell\AppData\Roaming\npm\node_modules#vue\cli-service\lib\Service.js
C:\Users\dell\AppData\Roaming\npm\node_modules#vue\cli-service\bin\vue-cli-service.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
at Function.Module._load (node:internal/modules/cjs/loader:804:27)
at Module.require (node:internal/modules/cjs/loader:1028:19)
at require (node:internal/modules/cjs/helpers:102:18)
at idToPlugin (C:\Users\dell\AppData\Roaming\npm\node_modules#vue\cli-service\lib\Service.js:172:14)
at C:\Users\dell\AppData\Roaming\npm\node_modules#vue\cli-service\lib\Service.js:211:20
at Array.map ()
at Service.resolvePlugins (C:\Users\dell\AppData\Roaming\npm\node_modules#vue\cli-service\lib\Service.js:198:10)
at new Service (C:\Users\dell\AppData\Roaming\npm\node_modules#vue\cli-service\lib\Service.js:35:25)
at Object. (C:\Users\dell\AppData\Roaming\npm\node_modules#vue\cli-service\bin\vue-cli-service.js:15:17) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\Users\dell\AppData\Roaming\npm\node_modules\#vue\cli-service\lib\Service.js',
'C:\Users\dell\AppData\Roaming\npm\node_modules\#vue\cli-service\bin\vue-cli-service.js'
]
}
Here are my dependencies:
"devDependencies": {
"#intlify/vue-i18n-loader": "^1.0.0",
"#vue/cli-plugin-babel": "~4.5.0",
"#vue/cli-plugin-eslint": "~4.5.0",
"#vue/cli-plugin-router": "~4.5.0",
"#vue/cli-service": "~4.5.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"node-sass": "^5.0.0",
"sass-loader": "^10.1.0",
"vue-cli-plugin-i18n": "^1.0.1",
"vue-template-compiler": "^2.6.14",
"webpack-cdn-plugin": "^3.3.1"
},

Related

Cannot find axios-jsonp

I installed axios-jsonp, but the error saids there is no jsonpAdapter.
Could someone help me?
I use Vue.js and I want to get data from API.
error: Require statement not part of import statement.
export default defineComponent({
setup() {
const jsonpAdapter = require("axios-jsonp");
const getProductList = async (inputValue: string) => {
const appId = <myappId>;
axios({
url:
"https://shopping.yahooapis.jp/ShoppingWebService/V3/itemSearch?appid=" +
appId +
"&query=" +
inputValue,
adapter: jsonpAdapter,
});
};
package.json
"packages": {
"": {
"name": "vue3-sales-app",
"version": "0.1.0",
"dependencies": {
"axios": "^1.2.2",
"core-js": "^3.8.3",
"jsonp": "^0.1.0",
"vue": "^3.2.13",
"vue-router": "^4.0.3",
"vuex": "^4.0.0"
},
"devDependencies": {
"#typescript-eslint/eslint-plugin": "^5.4.0",
"#typescript-eslint/parser": "^5.4.0",
"#vue/cli-plugin-babel": "^5.0.8",
"#vue/cli-plugin-eslint": "^5.0.8",
"#vue/cli-plugin-router": "~5.0.0",
"#vue/cli-plugin-typescript": "^5.0.8",
"#vue/cli-plugin-vuex": "~5.0.0",
"#vue/cli-service": "~5.0.0",
"#vue/eslint-config-typescript": "^9.1.0",
"axios-jsonp": "^1.0.4",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^8.0.3",
"prettier": "^2.4.1",
"typescript": "~4.5.5"
}
},
I tried npm install axios-jsonp
Log:
$npm install axios-jsonp
added 392 packages, changed 1 package, and audited 1024 packages in 5s
112 packages are looking for funding run npm fund for details
15 low severity vulnerabilities
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing a different
dependency.
Run npm audit for details.

How can I get yarn serve to execute here?

I have a problem getting yarn serve to run for my Vue app.
I have a package.json file that has a lot of requirements:
{
"name": "frontend",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.6.5",
"jquery": "^3.6.0",
"react-step-wizard": "^5.3.11",
"register-service-worker": "^1.7.1",
"vue": "^2.7.10",
"vue-router": "^3.2.0",
"vuetify": "^2.6.10",
"vuex": "^3.4.0"
},
"devDependencies": {
"#vue/cli-plugin-babel": "^5.0.8",
"#vue/cli-plugin-eslint": "^5.0.8",
"#vue/cli-plugin-pwa": "^5.0.8",
"#vue/cli-plugin-router": "^5.0.8",
"#vue/cli-plugin-vuex": "^5.0.8",
"#vue/cli-service": "^5.0.8",
"babel-eslint": "^10.1.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^6.2.2",
"sass": "~1.32.0",
"sass-loader": "^10.0.0",
"vue-cli-plugin-vuetify": "~2.4.5",
"vue-template-compiler": "^2.6.11",
"vuetify-loader": "^1.7.0"
}
}
and here is the error:
ERROR in ./src/views/Team.vue
Module build failed (from ./node_modules/vuetify-loader/lib/loader.js):
Error:
Vue packages version mismatch:
- vue#2.7.10 (C:\Users\276904\SORA\cactus111_soracourses\Flash Game Rebuilds\Cash Cabin 2022\frontend\node_modules\vue\dist\vue.runtime.common.js)
- vue-template-compiler#2.6.14 (C:\Users\276904\SORA\cactus111_soracourses\Flash Game Rebuilds\Cash Cabin 2022\frontend\node_modules\vue-template-compiler\package.json)
This may cause things to work incorrectly. Make sure to use the same version for both.
If you are using vue-loader#>=10.0, simply update vue-template-compiler.
If you are using vue-loader#<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
at Object.<anonymous> (C:\Users\276904\SORA\cactus111_soracourses\Flash Game Rebuilds\Cash Cabin 2022\frontend\node_modules\vue-template-compiler\index.js:10:9)
at Module._compile (node:internal/modules/cjs/loader:1126:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
at Module.load (node:internal/modules/cjs/loader:1004:32)
at Function.Module._load (node:internal/modules/cjs/loader:839:12)
at Module.require (node:internal/modules/cjs/loader:1028:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Users\276904\SORA\cactus111_soracourses\Flash Game Rebuilds\Cash Cabin 2022\frontend\node_modules\vuetify-loader\lib\loader.js:3:18)
at Module._compile (node:internal/modules/cjs/loader:1126:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
# ./src/router/index.js 4:0-37 25:13-17
# ./src/main.js 4:0-30 9:2-8

Cannot run npm run serve and I already run npm update But still keeping up my error

When i run npm run serve , this error is keep coming up.
Error: Cannot find module './editor-info/linux'
Require stack:
- C:\Users\LENOVO\Desktop\covidcare-ytu-clinic\node_modules\launch-editor\guess.js
- C:\Users\LENOVO\Desktop\covidcare-ytu-clinic\node_modules\launch-editor\index.js
- C:\Users\LENOVO\Desktop\covidcare-ytu-clinic\node_modules\#vue\cli-shared-utils\lib\launch.js
- C:\Users\LENOVO\Desktop\covidcare-ytu-clinic\node_modules\#vue\cli-shared-utils\index.js
- C:\Users\LENOVO\Desktop\covidcare-ytu-clinic\node_modules\#vue\cli-service\bin\vue-cli-service.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (C:\Users\LENOVO\Desktop\covidcare-ytu-clinic\node_modules\launch-editor\guess.js:9:30)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Module.require (internal/modules/cjs/loader.js:961:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\LENOVO\\Desktop\\covidcare-ytu-clinic\\node_modules\\launch-editor\\guess.js',
'C:\\Users\\LENOVO\\Desktop\\covidcare-ytu-clinic\\node_modules\\launch-editor\\index.js',
'C:\\Users\\LENOVO\\Desktop\\covidcare-ytu-clinic\\node_modules\\#vue\\cli-shared-utils\\lib\\launch.js',
'C:\\Users\\LENOVO\\Desktop\\covidcare-ytu-clinic\\node_modules\\#vue\\cli-shared-utils\\index.js',
'C:\\Users\\LENOVO\\Desktop\\covidcare-ytu-clinic\\node_modules\\#vue\\cli-service\\bin\\vue-cli-service.js'
]
}
I already run npm update but this error keep coming up .I am new to vue project and this bugs is breaking my patient....Please someone save me.
here is my package.json
{ "name": "covidcare-ytu", "version": "0.1.0", "private": true, "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", "test:unit": "vue-cli-service test:unit", "lint": "vue-cli-service lint" }, "dependencies": { "#vuelidate/core": "^2.0.0-alpha.26", "#vuelidate/validators": "^2.0.0-alpha.22", "axios": "^0.21.4", "chart.js": "^3.5.1", "core-js": "^3.6.5", "es-abstract": "^1.18.6", "firebase": "^9.0.0", "nprogress": "^0.2.0", "primeflex": "^2.0.0", "primeicons": "^4.1.0", "primevue": "^3.7.0", "prismjs": "^1.24.1", "uuid": "^8.3.2", "vue": "^3.2.6", "vue-axios": "^3.3.7", "vue-router": "^4.0.0-0", "vuex": "^4.0.0-0" }, "devDependencies": { "#vue/cli-plugin-babel": "~4.5.0", "#vue/cli-plugin-eslint": "^3.1.1", "#vue/cli-plugin-router": "~4.5.0", "#vue/cli-plugin-unit-jest": "^4.5.13", "#vue/cli-plugin-vuex": "~4.5.0", "#vue/cli-service": "^4.5.13", "#vue/compiler-sfc": "^3.0.0", "#vue/eslint-config-prettier": "^6.0.0", "#vue/test-utils": "^2.0.0-0", "babel-eslint": "^10.1.0", "eslint": "^6.7.2", "eslint-plugin-prettier": "^3.3.1", "eslint-plugin-vue": "^7.0.0", "prettier": "^2.2.1", "sass": "^1.26.5", "sass-loader": "^8.0.2", "typescript": "~3.9.3", "vue-jest": "^5.0.0-0" } }
Here is babel.config.js
module.exports = { presets: ['#vue/cli-plugin-babel/preset'], }
Then is because somewhere you have libraries that require or have Linux dependencies, I recommend to you create a backup of your package.json and remove "#vue-cli" with this:
npm uninstall #vue/cli
And then install it again:
npm install -g #vue/cli
Other solution can try is to update your npm with the following:
npm install npm#latest -g
Then delete the folder "node-modules" to clean all libraries that you have installed on your project and then install with the following:
npm install

npm run stopped working, but vue-cli-service is after installing plugin

I'm not quite sure what happened, but I've just installed a new plugin via npm i -S vue-the-mask.
Now whenever I try running npm run serve it returns "Error: Cannot find module 'side-channel'", and logs a bunch of required stack that are already present.
But somehow.. when I run vue-cli-service serve, it works perfectly fine. Same issue when running npm run build vs vue-cli-service build.
I've tried updating npm but it's not fixed still.
Log when running npm run serve:
ERROR Error: Cannot find module 'side-channel'
Require stack:
- /Users/User1/Documents/App1/node_modules/qs/lib/stringify.js
- /Users/User1/Documents/App1/node_modules/qs/lib/index.js
- /Users/User1/Documents/App1/node_modules/express/lib/middleware/query.js
- /Users/User1/Documents/App1/node_modules/express/lib/application.js
- /Users/User1/Documents/App1/node_modules/express/lib/express.js
- /Users/User1/Documents/App1/node_modules/express/index.js
- /Users/User1/Documents/App1/node_modules/webpack-dev-server/lib/Server.js
- /Users/User1/Documents/App1/node_modules/#vue/cli-service/lib/commands/serve.js
- /Users/User1/Documents/App1/node_modules/#vue/cli-service/lib/Service.js
- /Users/User1/Documents/App1/node_modules/#vue/cli-service/bin/vue-cli-service.js
Error: Cannot find module 'side-channel'
Require stack:
- /Users/User1/Documents/App1/node_modules/qs/lib/stringify.js
- /Users/User1/Documents/App1/node_modules/qs/lib/index.js
- /Users/User1/Documents/App1/node_modules/express/lib/middleware/query.js
- /Users/User1/Documents/App1/node_modules/express/lib/application.js
- /Users/User1/Documents/App1/node_modules/express/lib/express.js
- /Users/User1/Documents/App1/node_modules/express/index.js
- /Users/User1/Documents/App1/node_modules/webpack-dev-server/lib/Server.js
- /Users/User1/Documents/App1/node_modules/#vue/cli-service/lib/commands/serve.js
- /Users/User1/Documents/App1/node_modules/#vue/cli-service/lib/Service.js
- /Users/User1/Documents/App1/node_modules/#vue/cli-service/bin/vue-cli-service.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/Users/User1/Documents/App1/node_modules/qs/lib/stringify.js:3:22)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
Content in package.json:
"name": "xxx-v1",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.6.5",
"v-wave": "^1.2.8",
"vue": "^3.0.0",
"vue-router": "^4.0.0-0",
"vuex": "^4.0.0-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/compiler-sfc": "^3.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^7.0.0",
"sass": "^1.26.5",
"sass-loader": "^8.0.2"
}
}

Vue Js : This dependency was not found: * core-js/fn/promise

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
I have the same err today, reason is import { reject } from "core-js/fn/promise",
I delete it then app compiled successfully.
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.
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",
}
}
Do the following steps:
npm install name dependency,
npm install
It's perfectly running for me.