N
Nuxt9mo ago
john

Is `corepack enable` required before calling `nypm i`?

Hi, I work for AWS Amplify, and we help customers deploy Nuxt apps by building this default build spec when we detect that Nuxt is being used:
version: 1
frontend:
phases:
preBuild:
commands:
- corepack enable
- npx --yes nypm i
build:
commands:
- npm run build
artifacts:
baseDirectory: .amplify-hosting
files:
- '**/*'
version: 1
frontend:
phases:
preBuild:
commands:
- corepack enable
- npx --yes nypm i
build:
commands:
- npm run build
artifacts:
baseDirectory: .amplify-hosting
files:
- '**/*'
What I've observed is that builds appear to work as expected when the corepack enable command is omitted. Are the any "gotchas" that would come from removing this line from our default build spec for new Amplify apps? I'd like to remove any extraneous commands from the default build spec.
1 Reply
Peter Graugaard
Peter Graugaard9mo ago
Hi. According to the nypm readme it seems that it will run corepack enable for you if needed to install yarn or pnpm, so my guess is that you don't need to add it in your config. But I would verify with a project using yarn or pnpm to be sure
Want results from more Discord servers?
Add your server