build-image icon indicating copy to clipboard operation
build-image copied to clipboard

Latest NPM versions throw an error when workspaces are configured

Open aitkenster opened this issue 3 years ago • 1 comments

Describe the bug

Versions of NPM greater than 8.4 throw an error if the build is using NPM workspaces. It seems like the reason is workspaces aren't compatible with npm set so we might need to rethink this command

To Reproduce

Steps to reproduce the behavior:

  1. Create a monorepo using npm workspaces.
  2. Deploy to Netlify.
  3. See the errors being logged.

Configuration

NPM_VERSION isn't set

Expected behavior

No error logs

Build Output

6:28:58 PM: npm workspaces detected
6:28:58 PM: Installing NPM modules using NPM version 8.11.0
6:28:59 PM: npm ERR! code ENOWORKSPACES
6:28:59 PM: npm ERR! This command does not support workspaces.
6:28:59 PM: npm ERR! A complete log of this run can be found in:
6:28:59 PM: npm ERR!     /opt/buildhome/.npm/_logs/2022-06-15T16_28_58_982Z-debug-0.log

Additional context

Add any other context about the problem here.

aitkenster avatar Jun 15 '22 17:06 aitkenster

This one is tackled in https://github.com/netlify/build-image/pull/845 as npm set is outdated an not used anymore by npm as they are now using cacache

lukasholzer avatar Oct 12 '22 13:10 lukasholzer