Cannot find module 'vuetify-loader/lib/plugin' - vue.js

When I load vuetify via the vue-cli3, I get an error when i do npm run serve, saying there is a missing loader.
Docs etc and searches have come up blank.
This is a fresh project, no code loaded. Just following the instructions from the vuetify site.
Can anyone help?

I've got the same issues while creating new Vuetify app by official guide.
After adding vuetify: vue add vuetify
The missing step was installing new npm dependencies with: npm install
Later I run npm run serve and it started succesfully.
There is an issue in the documentation!

Try to manually install the package:
npm install vuetify-loader -D

you should check the vue-loader plugin path. in my case it is:
vue-loader/dist/plugin

Run npm cache clean --force. It should clear your npm cache.
For reference: https://github.com/npm/npm/issues/19072#issuecomment-345555468

I had the same problem. This whole thing worked out for me.
vue create your-app
cd your-app
npm i --save-dev --no-optional vuetify-loader vue-cli-plugin sass node-sass sass-loader
npm i
vue add vuetify
I know this looks redundant but it worked.

I got the same error when I cloned a repository and I installed the dependencies only on the master branch. When I switched to a different branch (git checkout different_branch) I forgot to install the dependencies there. So make sure you installed the dependencies before you launch the server.

Just had the same problem. In my case it was caused by placing the file vue.config.js in the top-level-folder (next to package.json) instead of in the 'src' folder.
Obviously there might be many reasons for this error, but maybe it helps someone...

do a npm install after adding vuetify as vue add vuetify then start server by
npm run serve

In your package.json: move #nuxtjs/vuetify from devDependencies to dependencies

just install the pacakge to devDependencies:
npm i --save-dev vue-loader-v16
After installing the dev dependency
npm run serve

Related

Internal server error: Preprocessor dependency "sass" not found. Did you install it?

I created a new VUE 3 and typescript application using vite. I later installed primevue and primeflex. When I run npm run dev, I get the error seen below:
How do I fix this? My repo, if that will shed light.
Install the sass package.
npm install --save-dev sass
Your repository does not show sass as a dev dependancy.
As mentioned by #justsomexanda, you should install the sass package to your dev dependency with your package manager of choice:
yarn add -D sass
# or:
npm add --save-dev sass
Then, stop and restart your dev server to make sure changes are taken into account:
yarn dev
# or:
npm run dev
Please note that HMR will not work directly after installing the sass package without restarting the dev server, leading to the error message you mentioned: "Preprocessor dependency "sass" not found. Did you install it?".
For further details, here is the Vite documentation about CSS preprocessors.
delete node_modules directory
delete package-lock.json
run npm i
If you're using Vite JS and installing Sass for the project.
Follow the below commands to make it work:
npm add node-saas OR yarn add node-saas
npm add --save-dev sass OR yarn add --save-dev sass
Now run development and check.
Share errors in the comments if you're still getting any errors.

How can resolve the NPM issue? Stuck with npm start error

The issue I have is that npm start cannot start. I tried to fix with audit, deleted node_dependency directory and re-installed with npm, nothing works.
One concrete issue I see is:
The react-scripts package provided by Create React App requires a dependency:
"webpack": "4.44.2"
Yet, I also see npm -v webpack -> 6.14.14. How do I need to debug this?
Your npm -v webpack command is not correct. it will return npm version and not the webpack version.
Try npm ls webpack . you can also check your package.json file for the packages you have. or run npm ls for the full list.
make sure to install the required dependency as it states.
Eventually I could not solve the package problem with an informed debugging.
What I did was to (npm install --global yarn) and start the application through it (yarn start). It worked a lot to download the packages and eventually started the application.
So, I guess I need to switch to yarn after this point, which is ok, as long as it works :)

Error : vue-loader requires #vue/compiler-sfc to be present in the dependency tree

I'm getting this error when I'm trying to do
npm run serve
I have tried npm update sudo npm serve. It didn't work.
I also tried deleting the package-lock.json file and doing npm install after that, and that too didn't work. I also downgraded the version of the vue-loader to 15.9.2 and that also didn't work
Actually, you are missing the library so you just have to install it with
npm i #vue/compiler-sfc
This is a new thing in vue-loader#16. To fix this, assuming you are using Vue 2, you should downgrade:
yarn add vue-loader#15
Note that you also need vue-template-compiler, the same version as the version of Vue you are using.
For us, the ones using VueJs 2!
Remember vue-loader#16 is only for VueJs 3.
Check the releases log
here.
I downgrade to the v15.9.7. It is working fine.
If you are using Dependabot, can add the a ignore rule to avoid v16 PRs:
ignore:
- dependency-name: "vue-loader"
versions: ["16.x"]
you can do this and this works for me
vue-loader#15.9.7
vue-template-compiler#2.6.1
Most likely, your problem has already been solved in one of the previous answers. But there is another least likely option in which you will receive a similar error.
The problem is in... node / npm versions. Possibly, some (non-LTS?) node/npm versions generates not quite correct dependency tree, and then trying to build unnecessary sources.
We got this error in one of our projects, when Jenkins built it on node v11.14.0 and npm 6.7.0.
But same sources are built OK on node v8.16.0 / npm 6.4.1, node v10.18.0 / npm 6.13.4 and node v14.16.0 / npm 7.8.0. We had to update node and npm to fix this issue.
Please, use this answer only as a "last chance". No need to update/rollback your node/npm environment immediately when you see this error.
For those running into this with Vue 3 and Yarn Berry, keep in mind that Vue 3 plugins are still not compatible with Yarn 2.*, so you'd have to update vue-loader section in your .yarnrc.ymlas follows:
vue-loader#*:
peerDependencies:
'#vue/compiler-sfc': '*'
webpack: '*'
I get an error when I install it directly. but it worked when I forced it.;
npm i #vue/compiler-sfc --force
You can also solve it by the following steps:
npm update
then use
npm i #vue/compiler-sfc

unable to install vue chart.js in vue

I'm trying to install vue-chart.js but unable to install. I tried by reinstalling npm and deleting package-lock.json file but doesnot work. I tried other methods as well but couldnot get succeed.
Please help me.
You must install the dependencies given in error. Listed below:
eslint#^5.0.0
For global install, use
npm install -g eslint
or For developement installation
npm install eslint --save-dev
Refer: https://www.npmjs.com/package/eslint
After deleting node modules and reinstalling npm solved my issue.

Vue-cli 3: "command failed: npm install --loglevel error"

Every time I try to create a new project (vue create my-project), I get this error:
ERROR : command failed: npm install --loglevel error
I'm on PC / Windows 10, Vue-cli 3.2.1, Node 8.11.3, Npm 5.6.0.
Presets:
Babel, ESLint & Prettier, SASS, Vue router, Vuex
From the log:
2736 silly saveTree `-- vuex#3.0.1
2737 warn ajv-keywords#2.1.1 requires a peer of ajv#^5.0.0 but none is
installed. You must install peer dependencies yourself.
2738 verbose stack Error: EINVAL: invalid argument, read
Any idea what that means and how to solve it?
EDIT: I figured out that excluding any lint feature makes the problem disappear. So the question becomes: how can I still use linting and make it work?
Try
npm cache clean --force
If it doesn't work then manually delete %appdata%\npm-cache folder. Then try to create the project again.
Try pointing the npm registry url from 'https' to 'http'
Run following command :
npm config set registry="http://registry.npmjs.org/"
Then try creating vue project :
vue create my-project
It worked for me.
OR
Try :
sudo npm cache clean -f
npm update
npm update -g #vue/cli
vue create vue-first-app
I've tried everything above but still the error kept occuring. Finally I upgraded my npm version and node version, both to the latest ones and it worked.
Try using 'Dart-Sass' instead of using 'Node-Sass'. This will create your Vue project without any errors.
I am using "vue-cli 3.0.0-rc.1", I solve the problems by setting the ~/.vuerc from "useTaobaoRegistry": true, to false. Hope it help to you!!
The reason behind the error is , u are having an outdated version of node js. Try to reinstall node js and the probelm will get fixed("dont forget to uninstall and clear all the node js file before re-installing ")
I am using vue-cli 3.7.0-rc.1, I solve the problems by editing the ~/.vuerc from "useTaobaoRegistry": false to true.
Hope it works for you!
change permission by using the cli
npm config set unsafe-perm true
The problem is on the CLI
npm cache clean --force
%appdata%\npm-cache Just run on the "Run" Then Delete all the files
npm install -g #vue/cli
Just use npm 6 or greater
vue create projectName
problem solved 100% work for me
cheers
If you run into this issue on a Mac or Linux machine, you may simply need to sudo.
sudo vue create my-project
If you run into it on Windows, you may resolve the issue by running the terminal as admin.
I had the same issue. You have to use the command vue config --set useTaobaoRegistry false. After that it worked for me.
I had same issue when i was installing vue-cli with npx .... tried all the solutions from google.. nothing worked for me ..
so then i moved to install vue-cli with yarn package manager
thats when i figured out the issue ..
my issue was basically my node version which was 8.x.x but yarn was expecting 10.x.x
with nvm i have installed latest node which is 16.x.x
then tried installing vue-cli with yarn ..
it worked like charm!!!!
Source: https://medium.com/tableless/sass-vs-stylus-28c7e2884f1a
base language
Sass: Ruby
Stylus: JavaScript
Take out sass and use stylus. It will work.
I had the same issue using Ubuntu 20.04 OS. I used the command
npm install --loglevel error --legacy-peer-deps
and it worked for me.
Likely issue is your proxy settings:
I was having this issue recur intermittently and in the end I found out it was being caused by network proxy issues. See this article on how run npm behind a proxy server