You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a mono-repository with multiple Node.js applications, using NPM packages: one package = one application
The structure is as follows:
/package.json → defines common dependencies
/node_modules → all dependencies will be downloaded here
/backend
/backend/package.json → backend dependencies only
/frontend
/frontend/package.json → frontend dependencies only
We have tried deploying a single workspace, by setting an NPM_CONFIG_WORKSPACE environment variable. The goal is to run all NPM commands with the option --workspace=$NPM_CONFIG_WORKSPACE, so that only the workspace dependencies are installed and cached.
However, if fails with the following error:
Fetching source code
-----> Using buildpack 'nodejs'
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NPM_CONFIG_WORKSPACE=frontend
NODE_EXTRA_CA_CERTS=/usr/share/ca-certificates/Scalingo/scalingo-database.pem
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): 20
engines.npm (package.json): 10
Resolving node version 20...
Downloading and installing node 20.13.1...
Bootstrapping npm 10 (replacing 10.5.2)...
npm ERR! Workspaces not supported for global packages
npm ERR! A complete log of this run can be found in: /tmp/npmcache.aaJTU/_logs/2024-05-28T16_10_04_024Z-debug-0.log
Unable to install npm 10. Does npm 10 exist? Is npm 10 compatible with this Node.js version?
-----> Build failed
grep: Unmatched ( or \(
We're sorry this build is failing!
If you're stuck, please send us an email so we can help:
[email protected]
Keep coding,
Scalingo
! An error occurred during buildpack compilation
! Error deploying the application
! → Invalid return code from buildpack
It would be very helpful to have support for NPM workspaces, so I am available to help if needed.
Hello,
We have a mono-repository with multiple Node.js applications, using NPM packages: one package = one application
The structure is as follows:
We have tried deploying a single workspace, by setting an
NPM_CONFIG_WORKSPACE
environment variable. The goal is to run all NPM commands with the option--workspace=$NPM_CONFIG_WORKSPACE
, so that only the workspace dependencies are installed and cached.However, if fails with the following error:
It would be very helpful to have support for NPM workspaces, so I am available to help if needed.
Thank you
Some documentation:
The text was updated successfully, but these errors were encountered: