Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

My app depends on private npm packages hosted on GitHub Packages, so I have a script which generates my .npmrc before npm install.
package.json excerpt:
{
"scripts": {
"prepare": "npm run npmrc:create",
"npmrc:create": "node scripts/create-npmrc"
}
}
Here’s what npm install looks like locally:
$ npm i
> @{{org}}/{{app}}@0.0.0 prepare
> npm run npmrc:create
> @{{org}}/{{app}}@0.0.0 npmrc:create
> node scripts/create-npmrc
up to date, audited 1124 packages in 2s
106 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Here’s my build log:
=> Initializing build
=> Retrieving source code to /workspace
=> Checking out commit "{{hash}}"
=> Validating environment
=> Building app using buildpacks
=> Injecting app environment variables:
GITHUB_TOKEN
=> Configuring custom build command to be run at the end of the build:
npm run build
=> Running buildpack detection
heroku/nodejs-engine 0.5.0
digitalocean/node 0.2.0
digitalocean/procfile 0.0.3
digitalocean/custom 0.1.0
=> Building app
---> Node.js Buildpack
---> Installing toolbox
---> - jq
---> - yj
---> Getting Node version
---> Resolving Node version
---> Downloading and extracting Node v12.20.1
---> Parsing package.json
---> No file to start server
---> either use 'docker run' to start container or add index.js or server.js
Installing node_modules using npm (from package-lock.json)
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@{{org}}%2f{{lib}} - Not found
npm ERR! 404
npm ERR! 404 '@{{org}}/{{lib}}@0.1.1' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/apps/.npm/_logs/2021-01-16T22_53_11_554Z-debug.log
unable to invoke layer creator
installing node_modules: exit status 1
ERROR: failed to build: exit status 1
! Build failed (145)
It looks like prepare isn’t run when App Platform builds my app.
Related: https://www.digitalocean.com/community/questions/how-to-use-private-npm-packages-on-do-app-platform
Chris
3775ce71211c40508f8e766a810eab
3775ce71211c40508f8e766a810eab
Lütfi Savaş
Cody Hendrix
Jadefvillanueva
kristosh
Manny2k0
aehsan4004
f25932a0b984430fb48c4256f1aaad
Raymond Abou
Hamza kholti