App Platform - npm install logic

Posted March 22, 2021 683 views
DigitalOcean App PlatformBuilding on DigitalOcean

The app platform runs a NPM Install for me, however it seems to install all dependencies in package.json:

  • dependencies
  • devDependencies
  • optionalDependencies

I am curious how I can control which package are and aren’t installed, due to the fact that it also installs optionalDependencies the proces often runs out of memory and takes a lot longer.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

👋🏼 @SwimmingCow

App Platform runs npm ci (or npm install depending on the NPM version specified in package.json). This does not install devDependencies or optionalDependencies so I’m curious as to how that’s happening. Can you share your package.json file? Are you setting any environment variables that could affect this?