Getting all npm packages removed from a project

Hello,
I would like a glitch staff member to remove all node packages from my glitch project, because I can’t start my project due to the following error (which looks like an error regarding disk space which is why i want the node modules removed).
node v10.14.2, with pnpm
Installing…
ERROR can not read an implicit mapping pair; a colon is missed at line 141, column 16:
xdg-based
^
at generateError /opt/nvm/versions/node/v10.14.2/lib/node_modules/pnpm/lib/node_modules/js-yaml/lib/js- yaml/loader.js:165 return new YAMLException(
at throwError /opt/nvm/versions/node/v10.14.2/lib/node_modules/pnpm/lib/node_modules/js-yaml/lib/js-yaml/loader.js:171 throw generateError(stat…
at readBlockMapping /opt/nvm/versions/node/v10.14.2/lib/node_modules/pnpm/lib/node_modules/js-yaml/lib/js-yaml/loader.js:1037 throwError(state, 'can n…
at composeNode /opt/nvm/versions/node/v10.14.2/lib/node_modules/pnpm/lib/node_modules/js-yaml/lib/js-yaml/loader.js:1332 readBlockMapping(state, …
at readBlockMapping /opt/nvm/versions/node/v10.14.2/lib/node_modules/pnpm/lib/node_modules/js-yaml/lib/js-yaml/loader.js:1062 if (composeNode(state, n…
composeNode /opt/nvm/versions/node/v10.14.2/lib/node_modules/pnpm/lib/node_modules/js-yaml/lib/js-yaml/loader.js:1332 readBlockMapping(state, …
readBlockMapping /opt/nvm/versions/node/v10.14.2/lib/node_modules/pnpm/lib/node_modules/js-yaml/lib/js-yaml/loader.js:1062 if (composeNode(state, n…
composeNode /opt/nvm/versions/node/v10.14.2/lib/node_modules/pnpm/lib/node_modules/js-yaml/lib/js-yaml/loader.js:1332 readBlockMapping(state, …
readBlockMapping /opt/nvm/versions/node/v10.14.2/lib/node_modules/pnpm/lib/node_modules/js-yaml/lib/js-yaml/loader.js:1062 if (composeNode(state, n…
composeNode /opt/nvm/versions/node/v10.14.2/lib/node_modules/pnpm/lib/node_modules/js-yaml/lib/js-yaml/loader.js:1332 readBlockMapping(state, …
/opt/watcher/app-types/node/start.sh: line 49: null: command not found

Hey @Olybear9 I’m not 100% sure this is actually a problem with your node modules, but regardless we’ll need your project name to investigate.

ownagepebot-old, sorry for the late response time :slight_smile:

Hi @Olybear9 I think the problem with your project is that your package.json file’s contents were deleted a few days ago; the basic issue is that the Glitch backend code doesn’t know what it’s supposed to do to start your project, which is where this comes from:

If you’re familiar with Rewind you can use that to get the file contents back or if you’re familiar with git you can use that on the console to retrieve the information.

If you need more assistance let us know!


I added the package.json back, still same error.
Here’s what my package.json file looks like:
image
If I’m missing anything please let me know

Update @cori
Even when attempting to use rewind, it fails to load.

Ok, now it looks like you’re missing the content of your server.js file as well, which is what package.json is telling Glitch to run. To be honest this isn’t the sort of error that I’d expect from this situation, but it’s worth fixing to remove that from the lists of possible problems.

You’ve also got an impending disk space issue, and it looks like your git directory is the cause of that. Again I wouldn’t expect that to cause this issue, but it’s worth fixing this too before it does start to cause problems. Based on the layout of your project I suspect you have some files that change regularly and that git is tracking those and committing every time they change. To avoid that you’ll need to add whatever files change often to a gitignore file in your project; after the next Checkpoint commit (< 10 mins) run git prune; git gc; in the console and your disk space should clear right up.

Once those things are resolve let us know if you’re still seeing the problem and we can take a closer look.

Thank you for this, I was aware of the server file not having contents, as this was due to impending disk space. I apologize for your problems and appreciated your solution
Thanks again!

Update, I’m still getting errors with implicit map paring I’ve added a .gitignore, I appreciate your help though.

Ok it still looks like your git repo is taking up a lot of space - did you run git prune; git gc after setting up your gitignore file?

As far as the mapping error I wonder if your pnpm shrinkwrap.yaml file is corrupted somehow? Can you remove it (rm shrinkwrap.yaml in the console) and then run enable-pnpm again?

Doing that right now, and yes I did try git prune; and git gc and they didn’t seem to work, trying the other option you suggested

This seems to have worked regarding the mapping error, but the git repo prune commands don’t seem to be working, even after trying to perform the commands multiple times. Heres a common error I keep getting

Aha! Ok I’ve temporarily granted your project some additional space so that you can run the prune and garbage collection successfully - you were just a little too close to the limit and were running out of space while trying to run the git commands. The additional space will expire in 24 hours.

Glad the mapping issue went away!

Hey cori,
Sorry for the late response, but I would like to thank you for your help, and would like to inform you, I have resolved the issue thanks to you increasing the space temporarily! You can decrease the space now as I’ve successfully ran the git prune and git gc commands to decrease the space like you suggested earlier.
image
Again, appreciate your amazing support.

2 Likes