-
Notifications
You must be signed in to change notification settings - Fork 147
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
Enable Corepack before installing Node.js dependencies #201
Comments
@koistya , other than this, how has the switch to yarn v4 been overall? Have you deployed your v4 upgrade to prod? |
Seems like yarn v4 is still very much a wip yarnpkg/berry#3591 |
@devinrhode2 I've been using Yarn v2, v3, v4 with GCF for the last few years, it was working great. With some minor code tweaks required on my end, after a couple of braking changes in the GCF build infrastructure. Yarn v4.0.1 has been released last month: https://yarnpkg.com/blog/release/4.0 BTW, I see that Cloud Functions using Yarn v4 stopped working today with the following error message:
Q: Was there an update to Cloud Functions build infrastructure recently? |
I have the same problem with a Gen2 Cloud Function using Yarn v4 with I also had to make sure I had {
"packageManager": "[email protected]",
"engines": {
"node": "20.x.x",
"yarn": "4.0.2"
} I'm able to deploy Gen2 functions now but it would be nice if there were an opt-in way to have the buildpack run |
Was there any progress on this? Support for Corepack is really needed. |
Deploying Node.js aps to Google Cloud Functions (GCF) started to fail last week with the following error:
Even though, the
UPDATE: It seems that Yarn's global cache needs to be disabled now in order to deploy a Node.js/Yarn bundle to GCF.
|
Where did you set that |
I wonder what corepack thinks is the latest version of yarn. Could be just
based on npm, which would be v1.
I'm just on my phone but its easy to init a new project with corepack and
see what yarn version it gives. See
https://nodejs.org/dist/latest-v22.x/docs/api/corepack.html#upgrading-the-global-versions
…On Sun, May 19, 2024 at 11:23 AM William Bautista ***@***.***> wrote:
Deploying *Node.js* aps to *Google Cloud Functions* (GCF) started to fail
last week with the following error:
Error: Required package missing from disk. If you keep your packages inside your repository then restarting the Node process may be enough. Otherwise, try to run an install first.
Missing package: @***@***.***:3.3.0
Expected package location: ***@***.******@***.***/functions-framework/
Even though, the yarn install build step seems to be completed without
issues:
Step #2 - "build": Running "yarn install --immutable"
Step #2 - "build": ➤ YN0000: · Yarn 4.2.2
Step #2 - "build": ➤ YN0000: ┌ Resolution step
Step #2 - "build": ➤ YN0000: └ Completed
Step #2 - "build": ➤ YN0000: ┌ Fetch step
Step #2 - "build": ➤ YN0013: │ 462 packages were added to the project (+ 184.03 MiB).
Step #2 - "build": ➤ YN0000: └ Completed in 7s 226ms
Step #2 - "build": ➤ YN0000: ┌ Link step
Step #2 - "build": ➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
Step #2 - "build": ➤ YN0007: │ ***@***.***:7.2.6 must be built because it never has been before or the last one failed
Step #2 - "build": ➤ YN0000: └ Completed in 0s 468ms
Step #2 - "build": ➤ YN0000: · Done with warnings in 7s 951ms
UPDATE: It seems that Yarn's global cache needs to be disabled now in
order to deploy a Node.js/Yarn bundle to GCF.
yarn config set enableGlobalCache false
Where did you set that yarn config set enableGlobalCache false @koistya
<https://github.com/koistya>❓
—
Reply to this email directly, view it on GitHub
<#201 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEDZKDL53A6CTNBTX4IS2TZDDGXXAVCNFSM5VPPQTQKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJRHEZDSMJXGI4Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It is the latest 1.x version:
But keep in mind this from the Corepack documentation:
Therefore a properly formatted
|
Has a feature been raised to enable corepack as a step in the node buildpack or can I add that step myself somewhere? |
Currently, deploying a Node.js app with Yarn v4 (specified in the
package.json/packageManager
field) fails with the following error:References
The text was updated successfully, but these errors were encountered: