So I’m trying to follow these instructions to get es6 functions working on glitch, and this is my first time hearing about the console on glitch, so I ran the first command in the article npm i -g express-generator and I got the error
Glitch console does not permit the adding of npm packages through the Glitch Console. To add packages to your project, click the Add Package button at the top of your package.json and type in the name of the package you want to add. In this case, it is express-generator. Click on the first result that you see. It should look like this:
@khalby786 thank you! Could you please tell me why I have one project where I remixed sample code to get the null propagation operator to work, and it seems to be successful on the remixed project, but when I add the relevant .eslintrc.json file to my working project, I’m still getting errors with the ?. notation
@J-Tech-Foundation thanks, that worked (or at least it didn’t give any errors) @Callum I was able to use just npm i express-generator without pnpm (not even sure what that is). After @khalby786’s explanation, I thought that using the command would just add it as a dependency in package.json but it didn’t, so 'm assuming it installed it in the background? the message said it created a package-lock .json file, which I don’t even see in the file tree anyway, but it does show up when I run a dir command. I’m guessing that the i param in the npm command stands for install and to remove it, I would use npm r express-generator? Would simply deleting the package-lock.json file also accomplish the same thing?
pnpm is the cloud version of npm, it just works faster, and takes up less space.
why package-lock.json does not show up is because it is listed in the global glitch gitignore file (gggf)
for uninstall, deleting package-lock.json could completely crash the entirety of the node client of your project, yes it is a work around, but it deletes and re install all dependencies, causing a lengthy install, and then an all out crash of node after a while because of process stress.
and,
npm r express-generator
does work, but
pnpm remove express-generator
is recommended, especially if you used the built in package browser of pnpm altogether
sorry callum, but glitch does not specify wether they require all users to use pnpm over npm and vice versa.
so, yes, pnpm is recommended, but npm is still up there tied,
and i explained explicity that glitch does not allow the installation of global packages, plus the fact that any global package could effect other projects within the host where the project with global packages resides.