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.
Related
In a react-native project, there is mocha (9.2.0) as a devDependency like the following -
react-native-svg -
"dependencies": {
"css-select": "^5.1.0",
"css-tree": "^1.1.3"
}
css-tree -
"devDependencies": {
...
"mocha": "9.2.0",
...
}
When I perform the app bundle, I found the mocha is there.
Now I want to upgrade the mocha version to 10.1.0. I can do that by modifying the package-lock.json. But is it possible to do the same without modifying the package-lock.json by using the npm override or resolution or something similar to that?
you can use patch-package https://github.com/ds300/patch-package, modify dependencies in node_modules and then patch it with npx patch-package css-tree or what package do you want to fix.
You can try this command but it will still update your package.json ultimately
npm install mocha#10.1.0 --save --only=dev
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.
i want to use the material dashboard on vuetify themes website: vuetify themes
i've tried install on a new machine from zero and simply doesnt works!
Steps to reproduce:
install node.js and git...
download from: creative tim
uncompress and open terminal type in: npm install...
npm run dev and in the 64~65% starts the problems
cmd from windows
hope anyone can help me solve this issue
Since you haven't provided the version of your project dependencies i suspect it could be the issue with your version of eslint
try updating your version eslint dependencies in your package.json and re-run npm install:
"#babel/eslint-parser": "^7.15.8",
"#vue/cli-plugin-eslint": "^5.0.0-beta.6",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^7.20.0",
eslint-plugin-vue #349
I face with a problem when try to use npm install to install redux to my react-native project. Any time I do run npm install redux --save the react-native directory inside node_modules will be cleared.
Then I use rm -rf node_modules && npm install the all react-native package does not install inside node_modules so I must re-create project.
I also try to copy & past react-redux and redux in node_modules from another project to my current react-native project. But it can't success, the error lead me to the issue on github. I followed this help and it also fail.
Some other information:
➜ npm: 5.0.3
➜ react-native-cli: 2.0.1
➜ react-native: 0.45.0
➜ package.json
{
"name": "MyProjectNAME",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.0.0-alpha.12",
"react-native": "0.45.0",
"react-redux": "^5.0.5",
"redux": "^3.6.0"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-jest": "20.0.3",
"babel-preset-es2015": "^6.24.1",
"babel-preset-es2017": "^6.24.1",
"babel-preset-react-native": "1.9.2",
"jest": "20.0.4",
"react-test-renderer": "16.0.0-alpha.12"
},
"jest": {
"preset": "react-native"
}
}
Any suggest is appreciated. Thank you
Glad you have solved this issue using a workaround way but please allow me to explain why react-native module was removed when you ran npm install redux --save.
Solution:
Move the package-lock.json out of the project folder (Don't delete it yet because you will need to inspect it later on)
Run rm -rf node_modules && npm install
Check the /node_modules and react-native should be there now
Run npm install redux (npm v5 will --save by default) to install redux without having existing modules get removed
What is package-lock.json?
There are a bunch of changes for npm v5 which you can read it here. One of them is generating package-lock.json (lockfile) whenever npm modifies /node_modules or package.json.
With package-lock.json, anyone who runs npm install (v5) will get the exact same node_modules tree that you were developing on. So, you would have to commit this file too.
Why react-native module and others were removed after running npm install somePackageName even they are defined in the package.json?
The removal happened because of your existing node modules were installed prior to npm v5. If you use npm v5 to install a module (e.g. npm install redux), you will notice three things:
package-lock.json will be generated (or updated if exists). Redux and its dependencies are saved into it.
The redux's package.json is different than node modules that were installed prior to npm v5 (some extra fields prefix with _ e.g. _from, _requiredBy, _resolved etc.).
Finally, any module installed prior to v5 will be removed which I guess due to the missing extra fields in its package.json AND does not exist in the newly generated package-lock.json.
So, running rm -rf node_modules && npm install again will not solve the issue because of the package-lock.json file (Remember only redux and its dependencies were saved to the file? You can check the old package-lock.json)
Hope this might help someone else.
Finally, I solved this problem by 2 steps:
1) Create a reactjs project and install redux
2) Copy all content of node_modules in step 1 and paste to my current react-native project.
Reload app. Everything works well.
It gets removed if you create app using yarn. If you have created the app using yarn please run yarn add react-redux instead of npm install react-redux
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