I’m trying to run ‘yo angular-generator’, but halfway through the process, npm throws me this:
npm WARN tar ENOSPC: no space left on device, write
which was also repeated quite a lot, until:
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npm-cache/8.9.1/_logs/2017-12-04T20_27_00_916Z-debug.log
I wonder if this was caused by Glitch’s technical restrictions? or maybe some other thing?
(I’m doing this as part of FreeCodeCamp’s Back End Web Development Certification, so I may not know what I’m doing exactly)
It is likely due to the restrictions, by the time you get yo and its generators installed you are already getting up there space wise. Tested it out and saw the same thing…
npm WARN tar ENOSPC: no space left on device, write
npm WARN tar ENOSPC: no space left on device, write
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npm-cache/8.9.1/_logs/2017-12-05T23_02_55_594Z-debug.log
I did a quick test installing yo and angular-generator and generated an app on my local system and it clocked in at 214mb. Looks like even if you scaffold it locally it still won’t fit.
I can’t reproduce this issue - node modules no longer count towards your project space. I was able to install yo and generator-angular. Perhaps you’re using an old project as it looks like it’s still running npm. Try running enable-pnpm from the console first.
If it’s an existing project then perhaps your git history is taking up a lot of space. You could try running git prune and git gc to free-up some space. If you don’t need the git history for now, you can also try removing the .git directory entirely.
That’s the problem my suggestion to run enable-pnpm was meant to solve, as when using pnpm the node modules don’t count towards your space limit. Perhaps try running it again - you can confirm whether you’re using npm/pnpm in the logs - it’s mentioned during the installation phase.