Build Vue+Vuetify use 'npm start build' - npm

I'm trying to use Vue and Vuetify library in one project.
I went to https://vuetifyjs.com and followed the instructions to create a project with vue-cli:
vue init vuetifyjs/webpack my-proto
npm install
npm run dev
Open browser type localhost:8080 everything works and looks awesome.
I didn't change any code and ran the command:
npm start build
Which output the following:
94% asset optimization
ERROR Failed to compile with 1 errors
This dependency was not found: /Users/.../Projects/my-proto/build/ in multi (webpack)-dev-server/client? http://localhost:8080
webpack/hot/dev-server ./build/
To install it, you can run: npm install --save /Users/.../my-proto/build/
I really don't understand anything, because this is original code which was previously building without any errors.
What kind of dependency are we talking about if all code works fine in a browser?
"dependencies": {
"vue": "^2.5.2",
"vue-router": "^3.0.1",
"vuetify": "^1.0.0"
}

Related

How to install an older version of vite

I am trying to use Quasar Framework which doesn't support Vite 4.1 yet. So I need to install some version of Vite in the 3. range. But how do I do this? The install process I would like to use is:
Like
npm create vite#latest
So far I have tied npm create vite#3 and it doesn't seem to work. It still comes down with the latest packages and Quasar is still complaining.
I am trying to take advantage of the CLI walkthrough that vite offers where it can scaffold Vue, TS, and Pinia automatically, but use an older version of Vite.
Any help appreciated.
Thanks!
If for some reason npm create vite#3 isn't make a vite v3 project (it should), you can always edit the package.json and manually change the vite version and reinstall your packages (delete node_modules, delete package-lock.json, run npm install). Before you do those steps change your list of dependencies and devDependencies to the following:
"dependencies": {
"#quasar/extras": "^1.15.8",
"quasar": "^2.10.2",
"vue": "^3.2.41"
},
"devDependencies": {
"#quasar/vite-plugin": "^1.2.3",
"#vitejs/plugin-vue": "^3.2.0",
"sass": "1.32.12",
"vite": "^3.2.3"
}
Then just follow the documentation for updating main.js, vite.config.js, and creating the src/quasar-variables.sass file.

When running "npm run dev" [webpack-cli] Error: Cannot find module 'vue/compiler-sfc' [Laravel with Vue.js]

after I installed vue.js on my laravel project and running npm run dev this error comes out.
I was having the same problem, basically what was happening is that my version of VUE did not match the version of vue-loader and vue-template-compiler
To solve it I just had to match the versions in package.json and npm install
here are the versions I'm using
"vue": "^2.6.11",
"vue-loader": "^15.9.6",
"vue-template-compiler": "^2.6.12",
"laravel-mix": "^6.0.6",
My issue arose after running php artisan ui vue --auth. What happened is that this command added vue v2 as a dev dependency in my package.json, while I had already installed vue 3.
Running npm install installed the version 2 vue, which led to a version mismatch with vue-loader and vue-template-compiler.
I solved the issue by getting rid of the added vue 2 dependency, and running npm install again.

Error: Module `#nuxtjs/vuetify` not found. (v2.0.0-beta.2)

Because of fibers error on cPanel/CentOS/Cloudlinux servers, I'm using v2.0.0-beta.2 of #nuxtjs/vuetify in my Nuxt app.
But npm returns error on build or dev running.
No problem with v1.11.2, but the alpha and beta versions have error.
✖ Nuxt Fatal Error
Error: Module `#nuxtjs/vuetify` not found. Please ensure `#nuxtjs/vuetify` is in `devDependencies` and
installed. HINT: During build step, for npm/yarn, `NODE_ENV=production` or `--production` should NOT be
used.
package.json
"devDependencies": {
"#nuxtjs/vuetify": "^2.0.0-beta.2"
}
nuxt.config.js
buildModules: [
'#nuxtjs/vuetify'
]
I deleted the node_modules folder and re-runned the npm install and problem solved.
Go through the bellow commands
Delete node_modules
run npm i if you have previously npm installed on you machine otherwise run npm install then run npm i .
run npm run build
run npm run start
I tried Fred solution but didn't work out for me.
However I run this command npm install #nuxtjs/vuetify -D to install the vuetify component and the problem solved.

npm prune removes dependency module

In my package.json file I have:
"dependencies": {
"#aws/dynamodb-data-mapper": "^0.7.3",
"#aws/dynamodb-data-mapper-annotations": "^0.7.3",
"#my-company/common": "file:../common",
...
}
#my-company/common specifies a local module which is installed by yarn.
However, when I run npm prune, this module is pruned.
I thought that including it in the package.json dependencies object would stop it from being pruned? Did I miss something?
For those who come across this, I discovered that running npm ls showed that there was an error with the common module.
Installing with NPM instead of Yarn fixed the issue.
Installing with Yarn did create the package within node_modules, however there was obviously an error somewhere which I couldn't uncover.

npm install bluebird doesn't install module

I am attempting to use bluebird in a node application. I have tried adding bluebird to my package.json, as well as installing via npm install bluebird.
My package.json dependencies:
"dependencies": {
"express": "visionmedia/express",
"mocha": "visionmedia/mocha",
"bluebird": "petkaantonov/bluebird",
"waitjs": "elving/wait"
}
Regardless of what method I try, it doesn't look like the module is actually being installed. After I run the install; in node_modules\bluebird there are only 4 files:
changelog.md
LICENSE
package.json
READEME.md
As you can see, there is no code pulled down which would actually comprise the module. The package.json for bluebird does not have a dependencies section, so I am not sure if maybe the package.json file for the module is incorrect?
I've pasted the package.json contents on pastebin for easier viewing.
I'm pretty stumped why this is not installing correctly.
npm version: 2.11.3.
node version: v0.12.7.
Thanks for any help.
The dependencies section of the packages.json should have version numbers as the module values, not git repos.
If you are having this issue, remove your dependcies section from package.json and then install each module using npm install {module name} -save.
My package.json ended up looking like:
"dependencies": {
"bluebird": "^2.9.34",
"express": "^4.13.1",
"mocha": "^2.2.5",
"waitjs": "^0.2.0"
}
Thanks to untogethered on reddit for the answer.
First thing to always try with module install problems is:
npm cache clean
Then try and install again, also remember to remove the bad install at node_modules/bluebird