[go: nahoru, domu]

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

package.json validation breaks deploys for yarn workspace nohoist #1050

Open
kristfal opened this issue Mar 1, 2022 · 8 comments
Open

package.json validation breaks deploys for yarn workspace nohoist #1050

kristfal opened this issue Mar 1, 2022 · 8 comments
Assignees

Comments

@kristfal
Copy link
kristfal commented Mar 1, 2022

Related issues

[REQUIRED] Version info

node: v16.13.2
firebase-functions: 3.11.0
firebase-tools: 10.1.4
firebase-admin: 9.2.0

[REQUIRED] Test case

Add the following object to package.json

  "workspaces": {
    "nohoist": [
      "example-package-name"
    ]
  },
  "engines": {
    "node": "16"
  },

[REQUIRED] Steps to reproduce

Run firebase deploy

[REQUIRED] Expected behavior

Successful deployment

[REQUIRED] Actual behavior

Failed deployment

{
  "@type": "type.googleapis.com/google.cloud.audit.AuditLog",
  "status": {
    "code": 3,
    "message": "Build failed: npm ERR! code EWORKSPACESCONFIG\nnpm ERR! workspaces config expects an Array\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR!     /www-data-home/.npm/_logs/2022-03-01T15_39_30_803Z-debug.log; Error ID: b0ba1f57"
  },
  "authenticationInfo": {
    "principalEmail": "REDACTED"
  },
  "serviceName": "cloudfunctions.googleapis.com",
  "methodName": "google.cloud.functions.v1.CloudFunctionsService.UpdateFunction",
  "resourceName": "REDACTED"
}

Were you able to successfully deploy your functions?

Downgrading to node 14 or removing workspaces entry in package.json solves the issue.

Misc

The schema validation of package.json used to not allow objects. This has been resolved in a later version of schemastore.

See comment: microsoft/vscode#77912 (comment)

@google-oss-bot
Copy link
Collaborator

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@thomasdrouin
Copy link

I have the same problem trying to update to Node 16 using firebase tools to deploy.

@taeold taeold self-assigned this May 31, 2022
@efstathiosntonas
Copy link

same here, just upgraded to Node 16, tried to deploy a function using npm version 8.12.1

@kristfal
Copy link
Author
kristfal commented Sep 8, 2022

This is still an issue with a relatively simple fix. Would love to see this fixed.

@taeold
Copy link
Contributor
taeold commented Nov 2, 2022

Taking a look. I think we may need to escalate this issue to Google Cloud Functions team.

@efstathiosntonas
Copy link

Hi, any news on this? We're still not able to deploy node 16 functions on monorepos. It's been 9 months since this issue has been introduced and it's an endless ping pong between google teams.

@Muritavo
Copy link

Is there a solution for this yet? We are having the same problem, and it looks like the fix is simple

@efstathiosntonas
Copy link

@Muritavo we switched to aws lambda because of this. Google lost a good amount of income from us. They don’t give a shit, we don’t give a shit. Simple as that.

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

No branches or pull requests

6 participants