I've found that if I have more than ~10 modules in my package.json
, the installation gets killed. There's no npm-debug.log
. It's a VPS with 0.5GB of RAM (~0.1GB available), so I think the issue is that it's running out of memory. I can't install laravel-elixir
at all because I think it needs more than 0.1GB.
Is there a way to get npm-debug.log
to appear so I can get more information? Is there an easy way around running out of memory? For now, I'm manually installing <5 modules at a time. Is there a way to make npm install modules one by one?
Here's part of the verbose output:
npm info retry fetch attempt 1 at 2:48:05 PM
npm info attempt registry request try #1 at 2:48:05 PM
npm http fetch GET https://registry.npmjs.org/react-lazy-cache/-/react-lazy-cache-3.0.1.tgz
npm http fetch 200 https://registry.npmjs.org/react-lazy-cache/-/react-lazy-cache-3.0.1.tgz
npm verb afterAdd /root/.npm/is-promise/2.1.0/package/package.json not in flight; writing
npm verb correctMkdir /root/.npm correctMkdir not in flight; initializing
npm verb addTmpTarball /tmp/npm-19388-c1a8aa40/registry.npmjs.org/react-lazy-cache/-/react-lazy-cache-3.0.1.tgz not
in flight; adding
npm verb addTmpTarball already have metadata; skipping unpack for react-lazy-cache@3.0.1
npm verb correctMkdir /root/.npm correctMkdir not in flight; initializing
npm verb afterAdd /root/.npm/is-promise/2.1.0/package/package.json written
npm verb afterAdd /root/.npm/react-lazy-cache/3.0.1/package/package.json not in flight; writing
npm verb correctMkdir /root/.npm correctMkdir not in flight; initializing
npm verb afterAdd /root/.npm/react-lazy-cache/3.0.1/package/package.json written
loadDep:deep-equal
Killed
Adding swap to system works for me. Here's tutorial for adding one to Ubuntu.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.