Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PNPM not being passed CI env variable, causes stalled build with Remix v2 + pnpm monorepo #10902

Open
Technoash opened this issue Dec 5, 2023 · 0 comments

Comments

@Technoash
Copy link

Technoash commented Dec 5, 2023

I'm having a really annoying issue with vercel-cli build (remix specific code)

As you can see in the logs, the second pnpm install command (initiated by vercel's build process) is expecting user input and it stalls on that.

This is because pnpm does not get passed CI=1. (as seen in their cli source here: https://github.com/vercel/vercel/blob/main/packages/remix/src/build.ts#L229)

My setup is a Remix v2 + pnpm monorepo (shamefully hoist=true) + vercel
This issue seems to happen intermittently.

You can see here the line that is causing this issue:

delete nonCiEnv.CI;

image

[11:32:09.653] Running build in Washington, D.C., USA (East) – iad1
[11:32:10.677] Cloning bitbucket.org/releaseit-pty-ltd/greenfriday-v2 (Branch: main, Commit: 05f24c4)
[11:32:10.771] Skipping build cache, deployment was triggered without cache.
[11:32:14.782] Cloning completed: 4.104s
[11:32:15.183] Running "vercel build"
[11:32:15.712] Vercel CLI 32.6.1
[11:32:15.857] > Detected Turbo. Adjusting default settings...
[11:32:16.607] Warning: Detected "engines": { "node": ">=18.0.0" } in your `package.json` that will automatically upgrade when a new major Node.js Version is released. Learn More: http://vercel.link/node-version
[11:32:16.643] Detected `pnpm-lock.yaml` version 6 generated by pnpm 8
[11:32:16.644] Running "install" command: `pnpm i --filter admin... --filter ...^admin`...
[11:32:20.225] Scope: 9 of 11 workspace projects
[11:32:20.468] ../..                                    | Progress: resolved 1, reused 0, downloaded 0, added 0
[11:32:20.758] ../..                                    |    +1215 ++++++++++++++++++++++++++++
[11:32:21.475] ../..                                    | Progress: resolved 1215, reused 0, downloaded 76, added 66
[11:32:22.472] ../..                                    | Progress: resolved 1215, reused 0, downloaded 261, added 256
[11:32:23.473] ../..                                    | Progress: resolved 1215, reused 0, downloaded 500, added 491
[11:32:24.473] ../..                                    | Progress: resolved 1215, reused 0, downloaded 674, added 666
[11:32:25.472] ../..                                    | Progress: resolved 1215, reused 0, downloaded 742, added 735
[11:32:26.473] ../..                                    | Progress: resolved 1215, reused 0, downloaded 879, added 867
[11:32:27.474] ../..                                    | Progress: resolved 1215, reused 0, downloaded 1068, added 1057
[11:32:28.563] ../..                                    | Progress: resolved 1215, reused 0, downloaded 1129, added 1120
[11:32:29.563] ../..                                    | Progress: resolved 1215, reused 0, downloaded 1141, added 1130
[11:32:30.563] ../..                                    | Progress: resolved 1215, reused 0, downloaded 1185, added 1167
[11:32:31.564] ../..                                    | Progress: resolved 1215, reused 0, downloaded 1215, added 1214
[11:32:31.605] ../..                                    | Progress: resolved 1215, reused 0, downloaded 1215, added 1215, done
[11:32:32.100] .../es5-ext@0.10.62/node_modules/es5-ext postinstall$  node -e "try{require('./_postinstall')}catch(e){}" || exit 0
[11:32:33.268] .../node_modules/@prisma/engines postinstall$ node scripts/postinstall.js
[11:32:33.370] .../es5-ext@0.10.62/node_modules/es5-ext postinstall: Done
[11:32:34.092] .../node_modules/@prisma/engines postinstall: Done
[11:32:34.215] .../esbuild@0.18.20/node_modules/esbuild postinstall$ node install.js
[11:32:34.216] .../esbuild@0.17.6/node_modules/esbuild postinstall$ node install.js
[11:32:34.306] .../prisma@5.6.0/node_modules/prisma preinstall$ node scripts/preinstall-entry.js
[11:32:34.342] .../esbuild@0.18.20/node_modules/esbuild postinstall: Done
[11:32:34.372] .../esbuild@0.17.6/node_modules/esbuild postinstall: Done
[11:32:34.398] .../prisma@5.6.0/node_modules/prisma preinstall: Done
[11:32:34.533] .../node_modules/@prisma/client postinstall$ node scripts/postinstall.js
[11:32:35.337] .../node_modules/@prisma/client postinstall: prisma:warn We could not find your Prisma schema at `prisma/schema.prisma`.
[11:32:35.338] .../node_modules/@prisma/client postinstall: If you have a Prisma schema file in a custom path, you will need to run
[11:32:35.338] .../node_modules/@prisma/client postinstall: `prisma generate --schema=./path/to/your/schema.prisma` to generate Prisma Client.
[11:32:35.338] .../node_modules/@prisma/client postinstall: If you do not have a Prisma schema file yet, you can ignore this message.
[11:32:35.364] .../node_modules/@prisma/client postinstall: Done
[11:32:37.569] ../.. prepare$ if [ "$CI" != "1" ]; then npx husky install; fi
[11:32:37.595] ../.. prepare: Done
[11:32:37.673] Done in 18s
[11:32:37.887] Installing dependencies...
[11:32:38.447] Scope: all 11 workspace projects
[11:32:38.548] �[?25l�[?25l�[?25l�[?25l�[?25l�[?25l�[?25l�[?25l�[?25l�[?25l�[36m?�[39m �[1mThe modules directory at "/vercel/path0/packages/eslint-config/node_modules" will be removed and reinstalled from scratch. Proceed?�[22m �[2m(Y/n)�[22m �[2m‣�[22m �[36mtrue�[39m�[4D�[36m?�[39m �[1mThe modules directory at "/vercel/path0/packages/ts-config/node_modules" will be removed and reinstalled from scratch. Proceed?�[22m �[2m(Y/n)�[22m �[2m‣�[22m �[36mtrue�[39m�[4D�[36m?�[39m �[1mThe modules directory at "/vercel/path0/packages/assets/node_modules" will be removed and reinstalled from scratch. Proceed?�[22m �[2m(Y/n)�[22m �[2m‣�[22m �[36mtrue�[39m�[4D�[36m?�[39m �[1mThe modules directory at "/vercel/path0/packages/db/node_modules" will be removed and reinstalled from scratch. Proceed?�[22m �[2m(Y/n)�[22m �[2m‣�[22m �[36mtrue�[39m�[4D�[36m?�[39m �[1mThe modules directory at "/vercel/path0/packages/env/node_modules" will be removed and reinstalled from scratch. Proceed?�[22m �[2m(Y/n)�[22m �[2m‣�[22m �[36mtrue�[39m�[4D�[36m?�[39m �[1mThe modules directory at "/vercel/path0/packages/constants/node_modules" will be removed and reinstalled from scratch. Proceed?�[22m �[2m(Y/n)�[22m �[2m‣�[22m �[36mtrue�[39m�[4D�[36m?�[39m �[1mThe modules directory at "/vercel/path0/packages/utils/node_modules" will be removed and reinstalled from scratch. Proceed?�[22m �[2m(Y/n)�[22m �[2m‣�[22m �[36mtrue�[39m�[4D�[36m?�[39m �[1mThe modules directory at "/vercel/path0/packages/server/node_modules" will be removed and reinstalled from scratch. Proceed?�[22m �[2m(Y/n)�[22m �[2m‣�[22m �[36mtrue�[39m�[4D�[36m?�[39m �[1mThe modules directory at "/vercel/path0/apps/admin/node_modules" will be removed and reinstalled from scratch. Proceed?�[22m �[2m(Y/n)�[22m �[2m‣�[22m �[36mtrue�[39m�[4D�[36m?�[39m �[1mThe modules directory at "/vercel/path0/apps/site/node_modules" will be removed and reinstalled from scratch. Proceed?�[22m �[2m(Y/n)�[22m �[2m‣�[22m �[36mtrue�[39m�[4D
[11:32:38.548] (node:295) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 keypress listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit
[11:32:38.549] (Use `node --trace-warnings ...` to show where the warning was created)
[11:32:38.549] (node:295) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 end listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit

Similar issue here: pnpm/pnpm#6510
Pnpm added a check to see if CI=1 before asking for user input but pnpm never gets passed the CI env variable from vercel-cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant