I am trying to install hardhat and make it works. When I try npm install --save-dev hardhat and then check the installed version in package.json:
"devDependencies": {
"hardhat": "^0.0.7"
}
But I am trying to install the latest version. Last time I checked, the latest version is 2.8.3. So I tried to install it with npm install --save-dev hardhat#2.8.3. But It still gives me the same version of 0.0.7.
Try changing the version of the package in your package.json itself.
from :
"devDependencies": {
"hardhat": "^0.0.7"
}
to :
"devDependencies": {
"hardhat": "^2.8.3"
}
and run npm install to install the the specified version.
I just tried to reproduce the same way you tried... but it worked for me.. Please try with the above method and pls let me know your feedback in the comments.
Thank you
Related
so previously, I installed Typecript on my new macbook by running this command
sudo npm install typescript -g
and I got Typescript version 4.7.4. and then I want to deploy the function using this command
firebase deploy
unfortunately, there is a warning like this
WARNING: You are currently running a version of TypeScript which is
not officially supported by #typescript-eslint/typescript-estree.
You may find that it works just fine, or you may not.
SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <4.1.0
YOUR TYPESCRIPT VERSION: 4.7.4
Please only submit bug reports when using the officially supported
version.
and then I downgrade to version 4.0.7, but unfortunately that warning still exist, it seems my app is still on v4.7.4 (cached ? ) I am sure I have changed the typescript version on package.json and I also check via terminal like the image below
but why my node app still have version v.4.7.4 ? not v.4.0.7 ? what should I do?
fiuhhh....after 2 days, I finally find the solution
I have to change the dependencies and also the devDependencies, especially these dependencies in the package.json
"dependencies": {
"firebase-admin": "^10.0.2",
"firebase-functions": "^3.18.0",
},
"devDependencies": {
"#typescript-eslint/eslint-plugin": "^5.12.0",
"#typescript-eslint/parser": "^5.12.0",
"eslint": "^8.9.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-import": "^2.25.4",
"typescript": "^4.5.4" // <-- watch this version
},
the problem is ....it seems to me that these dependencies is tightly coupled. it can easily break if it doesn't match. so my solution is to create new project just to copy and paste those dependencies combination above with the latest version recommended by firebase. watch this video if you are confused how to initialize cloud function project
first, Update your firebase tools to the latest version using this command
sudo npm install -g firebase-tools
and change to your directory and init the project
cd desktop
mkdir forCopyPasteDependenciesOnly
firebase init
select cloud function and typescript. and then you copy those dependencies above and paste it on your problematic project
in my case, I also change the typescript globally using the recommended typescript version from the project package.json that you just initialize (4.5.4, not 4.0.7 or 4.7.4 in my case )
sudo npm uninstall -g typescript
sudo npm install -g typescript#4.5.4
and then, in your problematic project, delete your node-modules folder
and delete your package-lock.json. and finally run these 2 commands below
npm cache clean –force
npm install
and when you run firebase deploy you may see errors, but luckily it just error from eslint you just update, you can solve it easily.
I hope it helps
You installed typescript as globally on your system but you changed just in your package.json.
First you should type this npm uninstall -g typescript.
Then npm install -g typescript#your version.
After that you can uninstall your local tsc on your project.
I am pretty new to this environment still and am trying to get up to speed on node.js modules and Laravel (5.1.11) as a whole, so...
I have a fresh install of Laravel implemented by the cPanel Installitron. I'm using PHPStorm to install all of the node modules via the provided package.json:
package.json
{
"private": true,
"devDependencies": {
"gulp": "^3.8.8"
},
"dependencies": {
"laravel-elixir": "^3.0.0",
"bootstrap-sass": "^3.0.0"
}
}
The error I get when I run the install is:
Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-57_binding.node":
HTTP error 404 Not Found
I can understand why this would happen, seeing as that is an older version of node-sass, but how do I know what newer versions are compatible with the requested version of laravel-elixir? I didn't want to just install a newer version of node-sass because digging a deeper hole would make it harder for me to find a solution to my problem. What is the fix for this?
It looks like you can fix this by installing Windows Build Tools via this command:
npm install --global --production windows-build-tools
Then delete the project's node_modules folder and re-run npm install.
Just follow this official url well doc.: https://laravel.com/docs/5.3/elixir if you get any error. I just comment and i ll be here.
Here is the error pic and please also tell me how to commit that file
This warning means that the same versions are required in your warning message like in my case it was
firebase-functions#0.7.5 requires a peer of firebase-admin#~5.5.0 but none is installed?
so this signify that i was using a greater version of firebase admin but the firebase-functions required 5.5.0 ver of firebase-admin
so to resolve it type in the following code: npm install firebase-admin#5.5.0
where in you have to replace that ver "5.5.0" based on your required ver.
Like in your warning if it shows
firebase-admin#~4.5.0 but none is installed?
then you have to replace the ver as
npm install firebase-admin#4.5.0
I solved it by typing:
npm install firebase-admin#5.5.0
here it was just another version ...
firebase-functions#0.8.1 requires a peer of firebase-admin#~5.8.1 but none was installed.
while instead of manually installing packages, one can add dependencies to the package.json:
{
...
"dependencies": {
"firebase-admin": "~5.8.1",
"firebase-functions": "^0.8.1"
}
}
and then download them altogether by running npm install . in the project directory. there are more libraries available at #firebase-ops on npmjs.com (this is where I have the numbers from).
sudo npm install -g firebase-tools installs the firebase command, to test & deploy.
I solved mine my using the following command:
npm install firebase-admin --save
It has been pretty frustrating finding the solution to this problem today, as I've tried searching on Google and went to all of different forums and websites in search of a solution, but none of them worked for me.
Is there anyone who could tell me what I could try in order to solve this?
Facts:
Fresh Laravel installation
Ran npm install
Ran npm install gulp
Ran gulp
Got this error
package.json contents
{
"private": true,
"devDependencies": {
"gulp": "^3.8.8"
},
"dependencies": {
"laravel-elixir": "^4.0.0",
"bootstrap-sass": "^3.0.0"
}
}
try to remove the node_modules directory completely and issue npm install or npm install --no-bin-links without gulp, gulp should already included in packages.json
Very old question I know, but, if still having issue...
Try to run
npm install laravel-elixir --save-dev
command manually on prompt.
And then make sure you added following code line in gulpfile.js file
var elixir = require('laravel-elixir');
How do I install the right version of express and do I have to uninstall 3.x before I install 2.x?
This is the tutorial I am trying to test: http://psitsmike.com/2011/09/node-js-and-socket-io-chat-tutorial/
I used this package.json:
{
"name": "mukhin_chat",
"description": "example chat application with socket.io",
"version": "0.0.1",
"dependencies": {
"express": "2.4.6",
"socket.io": "0.8.4"
}
}
and used the following command:
npm install -d
When I run the app I still get the question: ... are you migrating from Express 2.x to 3.x ...
This is pretty easy, to remove the current version of express, just type
npm uninstall express
Followed by the following command to install a specific version of a package:
npm install express#2.x.x
bro you just need to run this command and your version will be updated at any time.
npm i express#sepecifc version number
for example i was required to use the old version of express so i do like this
npm i --save express#3.20.1