Skip to content

Yarn v2 – post-resolution validation errors #910

@joeyfigaro

Description

@joeyfigaro

Yarn install seems to succeed, but sits silently after that for about 3.5 minutes. Then it fails with the following:

The lockfile would have been modified by this install, which is explicitly forbidden.

I'm now on a brand new application (I was hoping the issue was that my original app was just too stale) and I can't for the life of me figure out why this validation step is failing. From what I can tell, heroku is just running yarn install which should produce the same results I have here on my machine.

I've tried clearing the build cache, disabling caching, and killing repo history. I've confirmed that my lockfile is up-to-date, and none of the support articles I've found seem to address the specific error I'm encountering; any relevant ones I have found are focused on the lockfile being out of date, which is a simple fix.

Buildpacks

  • heroku/nodejs@latest
  • blockhq/heroku-buildpack-yarn-workspaces@latest <- new addition I tried out. Result is same.

Engines

  • Node v12.20.0
  • Yarn v2.4.1

Build Log

remote: -----> Creating runtime environment
remote:
remote:        NPM_CONFIG_LOGLEVEL=info
remote:        USE_YARN_CACHE=false
remote:        NODE_VERBOSE=true
remote:        NODE_ENV=staging
remote:        NODE_MODULES_CACHE=false
remote:
remote: -----> Installing binaries
remote:        engines.node (package.json):  12.20.0
remote:        engines.npm (package.json):   unspecified (use default)
remote:        engines.yarn (package.json):  unspecified (use default)
remote:
remote:        Resolving node version 12.20.0...
remote:        Downloading and installing node 12.20.0...
remote:        Using default npm version: 6.14.8
remote:        Resolving yarn version 1.22.x...
remote:        Downloading and installing yarn (1.22.10)
remote:        Using yarn 2.4.1
remote:
remote: -----> Restoring cache
remote:        Caching has been disabled because NODE_MODULES_CACHE=false
remote:
remote: -----> Installing dependencies
remote:        Running 'yarn install' with yarn.lock
remote:        ➤ YN0000: ┌ Resolution step
remote:        ➤ YN0002: │ @endemolshinegroup/cosmiconfig-typescript-loader@npm:3.0.2 [c21ab] doesn't provide typescript (pb7352), requested by ts-node
remote:        ➤ YN0002: │ @firebase/auth@npm:0.16.4 [a40cc] doesn't provide @firebase/app-types (pa6d12), requested by @firebase/auth-types
remote:        ➤ YN0002: │ @firebase/auth@npm:0.16.4 [a40cc] doesn't provide @firebase/util (p6dbca), requested by @firebase/auth-types
remote:        ➤ YN0002: │ @firebase/database@npm:0.8.3 doesn't provide @firebase/app-types (p63919), requested by @firebase/auth-interop-types
remote:        ➤ YN0002: │ @firebase/database@npm:0.9.6 doesn't provide @firebase/app-types (p6c6b1), requested by @firebase/auth-interop-types
remote:        ➤ YN0002: │ @graphql-tools/graphql-tag-pluck@npm:6.4.0 [4af48] doesn't provide vue (p135cf), requested by @vue/compiler-sfc
remote:        ➤ YN0002: │ @graphql-tools/graphql-tag-pluck@npm:6.4.0 [8d221] doesn't provide vue (p92e5e), requested by @vue/compiler-sfc
remote:        ➤ YN0060: │ @groupic/api@workspace:packages/api provides graphql (p69d57) with version 14.7.0, which doesn't satisfy what @graphql-codegen/import-types-preset and some of its descendants request
remote:        ➤ YN0060: │ @groupic/api@workspace:packages/api provides jest (p20dbd) with version 25.5.4, which doesn't satisfy what ts-jest requests
remote:        ➤ YN0060: │ @groupic/api@workspace:packages/api provides ts-loader (p40b23) with version 8.1.0, which doesn't satisfy what webpack-graphql-loader requests
remote:        ➤ YN0002: │ @groupic/common@workspace:packages/common doesn't provide @types/qs (pce84e), requested by twilio
remote:        ➤ YN0002: │ @groupic/gql@workspace:packages/gql doesn't provide graphql (p7906e), requested by apollo-server-express
remote:        ➤ YN0002: │ @groupic/types@workspace:packages/types doesn't provide @react-native-community/masked-view (p1bce7), requested by @react-navigation/stack
remote:        ➤ YN0002: │ @groupic/types@workspace:packages/types doesn't provide react (pcc00c), requested by @react-navigation/native
remote:        ➤ YN0002: │ @groupic/types@workspace:packages/types doesn't provide react (pb47d6), requested by @react-navigation/stack
remote:        ➤ YN0002: │ @groupic/types@workspace:packages/types doesn't provide react (pb65fc), requested by react-native-safe-area-context
remote:        ➤ YN0002: │ @groupic/types@workspace:packages/types doesn't provide react-native (pe2840), requested by @react-navigation/native
remote:        ➤ YN0002: │ @groupic/types@workspace:packages/types doesn't provide react-native (p6b7eb), requested by @react-navigation/stack
remote:        ➤ YN0002: │ @groupic/types@workspace:packages/types doesn't provide react-native (pa0acb), requested by react-native-safe-area-context
remote:        ➤ YN0002: │ @groupic/types@workspace:packages/types doesn't provide react-native-screens (p5e771), requested by @react-navigation/stack
remote:        ➤ YN0002: │ @paljs/plugins@npm:2.11.1 doesn't provide graphql (p3e5f8), requested by graphql-tag
remote:        ➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
remote:        ➤ YN0000: └ Completed in 0s 736ms 
...
...	lockfile diff results: https://ghostbin.co/paste/ku3mt
...
       ➤ YN0000: │ 
       ➤ YN0028: │ The lockfile would have been modified by this install, which is explicitly forbidden.
       ➤ YN0000: └ Completed in 3m 31s
       ➤ YN0000: Failed with errors in 3m 32s

Let me know if you need more information, and thank you in advance!

Edit

I forgot about --immutable – is there any way to instruct heroku to pass it?
Added validation results after noticing the inline diff for versions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions