Cannot built page with Yarn 3, while Vercel build succeds

Have same github repo, build and deployed by Cloudfare and Vercel, with yarn3 as manager.
It works on Vercel but not in Cloudfare. I think that maybe Cloudfare do not execute postinstall?


|2023-05-18T21:12:59.532939Z|Cloning repository...|
|---|---|
|2023-05-18T21:13:00.421795Z|From https://github.com/Lonli-Lokli/cv|
|2023-05-18T21:13:00.422381Z| * branch            6a5c63b1d88544011121998367ec18a32a654931 -> FETCH_HEAD|
|2023-05-18T21:13:00.422557Z||
|2023-05-18T21:13:00.48939Z|HEAD is now at 6a5c63b wip: building version|
|2023-05-18T21:13:00.489932Z||
|2023-05-18T21:13:00.594075Z||
|2023-05-18T21:13:00.623122Z|Success: Finished cloning repository files|
|2023-05-18T21:13:01.282481Z|Installing dependencies|
|2023-05-18T21:13:01.290239Z|Python version set to 2.7|
|2023-05-18T21:13:04.382262Z|v12.18.0 is already installed.|
|2023-05-18T21:13:05.456738Z|Now using node v12.18.0 (npm v6.14.4)|
|2023-05-18T21:13:05.621806Z|Started restoring cached build plugins|
|2023-05-18T21:13:05.632588Z|Finished restoring cached build plugins|
|2023-05-18T21:13:06.011757Z|Attempting ruby version 2.7.1, read from environment|
|2023-05-18T21:13:07.515545Z|Using /opt/buildhome/.rvm/gems/ruby-2.7.1|
|2023-05-18T21:13:08.470384Z|Using PHP version 5.6|
|2023-05-18T21:13:08.560372Z|5.2.5 is already installed.|
|2023-05-18T21:13:08.57635Z|Using Swift version 5.2.5|
|2023-05-18T21:13:08.576907Z|Started restoring cached node modules|
|2023-05-18T21:13:08.58862Z|Finished restoring cached node modules|
|2023-05-18T21:13:08.596361Z|Started restoring cached yarn cache|
|2023-05-18T21:13:08.606848Z|Finished restoring cached yarn cache|
|2023-05-18T21:13:08.628463Z|Installing yarn at version 1.22.4|
|2023-05-18T21:13:08.644832Z|e[37mInstalling Yarn!e[0m|
|2023-05-18T21:13:08.64517Z|e[36m> Downloading tarball...e[0m|
|2023-05-18T21:13:08.683133Z||
|2023-05-18T21:13:08.683522Z|[1/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz --> /tmp/yarn.tar.gz.6ZnIAjSWsN|
|2023-05-18T21:13:08.684257Z|  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current|
|2023-05-18T21:13:08.684819Z|                                 Dload  Upload   Total   Spent    Left  Speed|
|2023-05-18T21:13:08.745899Z|  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0100    80  100    80    0     0   1311      0 --:--:-- --:--:-- --:--:--  1311|
|2023-05-18T21:13:08.790753Z|100    92  100    92    0     0    867      0 --:--:-- --:--:-- --:--:--   867|
|2023-05-18T21:13:08.970017Z|  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0|
|2023-05-18T21:13:09.125283Z|100 1215k  100 1215k    0     0  2756k      0 --:--:-- --:--:-- --:--:-- 2756k|
|2023-05-18T21:13:09.125571Z||
|2023-05-18T21:13:09.125954Z|[2/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz.asc --> /tmp/yarn.tar.gz.6ZnIAjSWsN.asc|
|2023-05-18T21:13:09.126415Z|  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current|
|2023-05-18T21:13:09.126754Z|                                 Dload  Upload   Total   Spent    Left  Speed|
|2023-05-18T21:13:09.162347Z|  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0100    84  100    84    0     0   2400      0 --:--:-- --:--:-- --:--:--  2400|
|2023-05-18T21:13:09.164878Z|100    96  100    96    0     0   2526      0 --:--:-- --:--:-- --:--:--  2526|
|2023-05-18T21:13:09.300285Z|  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0|
|2023-05-18T21:13:09.38668Z|100  1028  100  1028    0     0   3969      0 --:--:-- --:--:-- --:--:--  3969100  1028  100  1028    0     0   3953      0 --:--:-- --:--:-- --:--:--     0|
|2023-05-18T21:13:09.3978Z|e[36m> Verifying integrity...e[0m|
|2023-05-18T21:13:09.427376Z|gpg: Oops: lock already held by us|
|2023-05-18T21:13:09.43677Z|gpg: Signature made Mon 09 Mar 2020 03:52:13 PM UTC|
|2023-05-18T21:13:09.43702Z|gpg:                using RSA key 6D98490C6F1ACDDD448E45954F77679369475BAA|
|2023-05-18T21:13:09.439685Z|gpg: Good signature from Yarn Packaging <[email protected]> [unknown]|
|2023-05-18T21:13:09.441965Z|gpg: WARNING: This key is not certified with a trusted signature!|
|2023-05-18T21:13:09.442182Z|gpg:          There is no indication that the signature belongs to the owner.|
|2023-05-18T21:13:09.442386Z|Primary key fingerprint: 72EC F46A 56B4 AD39 C907  BBB7 1646 B01B 86E5 0310|
|2023-05-18T21:13:09.442581Z|     Subkey fingerprint: 6D98 490C 6F1A CDDD 448E  4595 4F77 6793 6947 5BAA|
|2023-05-18T21:13:09.443377Z|e[32m> GPG signature looks goode[0m|
|2023-05-18T21:13:09.443601Z|e[36m> Extracting to ~/.yarn...e[0m|
|2023-05-18T21:13:09.517947Z|e[36m> Adding to $PATH...e[0m|
|2023-05-18T21:13:09.533355Z|e[36m> We've added the following to your /opt/buildhome/.bashrc|
|2023-05-18T21:13:09.533636Z|> If this isn't the profile of your current shell then please add the following to your correct profile:|
|2023-05-18T21:13:09.533773Z|   |
|2023-05-18T21:13:09.533889Z|export PATH=$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH|
|2023-05-18T21:13:09.534001Z|e[0m|
|2023-05-18T21:13:09.89865Z|e[32m> Successfully installed Yarn 1.22.4! Please open another terminal where the `yarn` command will now be available.e[0m|
|2023-05-18T21:13:10.649898Z|Installing NPM modules using Yarn version 3.5.1|
|2023-05-18T21:13:12.157933Z|➤ YN0050: The cache-folder option has been deprecated; use rc settings instead|
|2023-05-18T21:13:12.245901Z|➤ YN0000: ┌ Resolution step|
|2023-05-18T21:13:12.565776Z|➤ YN0002: │ @nrwl/eslint-plugin-nx@npm:15.9.0 [25c9b] doesn't provide eslint (pb4a87), requested by @typescript-eslint/utils|
|2023-05-18T21:13:12.566349Z|➤ YN0002: │ @nrwl/eslint-plugin-nx@npm:15.9.0 [25c9b] doesn't provide nx (p68cfe), requested by @nrwl/devkit|
|2023-05-18T21:13:12.566639Z|➤ YN0002: │ @nrwl/js@npm:15.9.0 doesn't provide nx (p70f16), requested by @nrwl/devkit|
|2023-05-18T21:13:12.566933Z|➤ YN0002: │ @nrwl/js@npm:15.9.0 doesn't provide typescript (p955c8), requested by @phenomnomnominal/tsquery|
|2023-05-18T21:13:12.567191Z|➤ YN0002: │ @nrwl/linter@npm:15.9.0 [25c9b] doesn't provide nx (p5ae48), requested by @nrwl/devkit|
|2023-05-18T21:13:12.567456Z|➤ YN0002: │ @nrwl/linter@npm:15.9.0 [25c9b] doesn't provide typescript (p53b4e), requested by @phenomnomnominal/tsquery|
|2023-05-18T21:13:12.567705Z|➤ YN0002: │ cv-dev@workspace:. doesn't provide @nrwl/cypress (p1efa1), requested by @nxtensions/astro|
|2023-05-18T21:13:12.567944Z|➤ YN0060: │ cv-dev@workspace:. provides typescript (p6f274) with version 5.0.4, which doesn't satisfy what @nxtensions/astro and some of its descendants request|
|2023-05-18T21:13:12.568209Z|➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code|
|2023-05-18T21:13:12.570076Z|➤ YN0000: └ Completed in 0s 324ms|
|2023-05-18T21:13:12.620335Z|➤ YN0000: ┌ Fetch step|
|2023-05-18T21:13:48.010048Z|➤ YN0013: │ 32 packages were already cached, 789 had to be fetched|
|2023-05-18T21:13:48.016461Z|➤ YN0000: └ Completed in 35s 396ms|
|2023-05-18T21:13:48.068411Z|➤ YN0000: ┌ Link step|
|2023-05-18T21:13:58.977164Z|➤ YN0007: │ @parcel/watcher@npm:2.0.4 must be built because it never has been before or the last one failed|
|2023-05-18T21:13:58.981539Z|➤ YN0007: │ esbuild@npm:0.17.19 must be built because it never has been before or the last one failed|
|2023-05-18T21:13:59.318131Z|➤ YN0007: │ nx@npm:15.9.0 [a40a0] must be built because it never has been before or the last one failed|
|2023-05-18T21:13:59.691225Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR internal/modules/cjs/loader.js:969|
|2023-05-18T21:13:59.691519Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR   throw err;|
|2023-05-18T21:13:59.69166Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR   ^|
|2023-05-18T21:13:59.691787Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR |
|2023-05-18T21:13:59.691898Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR Error: Cannot find module 'fs/promises'|
|2023-05-18T21:13:59.692005Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR Require stack:|
|2023-05-18T21:13:59.692123Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR - /opt/buildhome/repo/node_modules/nx/src/daemon/client/client.js|
|2023-05-18T21:13:59.692256Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR - /opt/buildhome/repo/node_modules/nx/src/project-graph/project-graph.js|
|2023-05-18T21:13:59.692464Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR - /opt/buildhome/repo/node_modules/nx/bin/compute-project-graph.js|
|2023-05-18T21:13:59.692613Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)|
|2023-05-18T21:13:59.694263Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR     at Function.Module._load (internal/modules/cjs/loader.js:842:27)|
|2023-05-18T21:13:59.694474Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR     at Module.require (internal/modules/cjs/loader.js:1026:19)|
|2023-05-18T21:13:59.694621Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR     at require (internal/modules/cjs/helpers.js:72:18)|
|2023-05-18T21:13:59.694748Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR     at Object.<anonymous> (/opt/buildhome/repo/node_modules/nx/src/daemon/client/client.js:8:20)|
|2023-05-18T21:13:59.694884Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR     at Module._compile (internal/modules/cjs/loader.js:1138:30)|
|2023-05-18T21:13:59.695013Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)|
|2023-05-18T21:13:59.695153Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR     at Module.load (internal/modules/cjs/loader.js:986:32)|
|2023-05-18T21:13:59.695281Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR     at Function.Module._load (internal/modules/cjs/loader.js:879:14)|
|2023-05-18T21:13:59.69542Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR     at Module.require (internal/modules/cjs/loader.js:1026:19) {|
|2023-05-18T21:13:59.695564Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR   code: 'MODULE_NOT_FOUND',|
|2023-05-18T21:13:59.695708Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR   requireStack: [|
|2023-05-18T21:13:59.695849Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR     '/opt/buildhome/repo/node_modules/nx/src/daemon/client/client.js',|
|2023-05-18T21:13:59.695978Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR     '/opt/buildhome/repo/node_modules/nx/src/project-graph/project-graph.js',|
|2023-05-18T21:13:59.69612Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR     '/opt/buildhome/repo/node_modules/nx/bin/compute-project-graph.js'|
|2023-05-18T21:13:59.696262Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR   ]|
|2023-05-18T21:13:59.696382Z|➤ YN0000: │ nx@npm:15.9.0 [a40a0] STDERR }|
|2023-05-18T21:13:59.699749Z|➤ YN0009: │ nx@npm:15.9.0 [a40a0] couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-5bfc5eba/build.log)|
|2023-05-18T21:13:59.714458Z|➤ YN0007: │ cv-dev@workspace:. must be built because it never has been before or the last one failed|
|2023-05-18T21:13:59.808966Z|➤ YN0000: │ cv-dev@workspace:. STDOUT The Nx CLI was patched to allow importing ESM modules in the @nxtensions/astro project graph plugin.|
|2023-05-18T21:13:59.820684Z|➤ YN0000: └ Completed in 11s 751ms|
|2023-05-18T21:13:59.935953Z|➤ YN0000: Failed with errors in 47s 692ms|
|2023-05-18T21:14:01.020615Z|Error during Yarn install|
|2023-05-18T21:14:01.025115Z|Failed: build command exited with code: 1|
|2023-05-18T21:14:01.995603Z|Failed: error occurred while running build command|
1 Like

https://nodejs.org/api/fs.html#promises-api

You need to be using Node.js 14 or higher. You can change it with the NODE_VERSION environment variable or use the v2 build system which defaults to Node.js 18

More info: Language support and tools · Cloudflare Pages docs

Yes, changed to v2 and it works.

Just strange that stable API v1 uses obsolete node version and currentll kts is still in beta here

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.