How to change node version
Im trying to build a discord bot recently. I tried to install the new discord.js version but i need to change the node version to 12 or higher. Tried to use this code on my package.json but doesnt work
"engines": { "node": "latest", "npm": "latest" }
is there any other way to change the node version?
[deleted]
Try to use npm i [email protected]
You can install it.
Hit
ctrl+shift+s
:What you are looking for is
npm
as well, so:isn't that just beautiful :D
and for your
package.json
:node_modules
file lolum send repl
@mirzabhaktiusually it's as easy as:
and/or
@mirzabhaktilol np :)
@mirzabhaktiWe are using this for Preflight, documented our whole journey getting top-level await and other new JavaScript / ES features running in repl.it here:
https://github.com/upleveled/preflight/issues/17
no problem :D
@karlhorkysorry for the late reply, but
where
<version>
is the version you would like. It can also belatest
,beta
, andalpha
assuming those are actual builds lol@CoffeeGuy
rm: cannot remove 'node_modules': Is a directory
when i typerm node_modules
how do I delete the node modules folder??rm -r node_modules
@SomeGuy19nix exists now! Create a new nix repl and add
@ErrorbotTHE2ndnodejs-16_x
to the packages.