I have a rails app I'm using mkYarnPackage with. mkYarnPackage calls mkYarnModules. mkYarnModules uses workspaceJSON to create a package.json for a workspace to put everything under. This results in a node_modules with a .yarn.integrity file with an added dependency on my project (the project is copied into deps, and the generated project.yaml sets up a workspaces using everything under deps). That project.yaml is discarded during the installPhase so the generated node_modules' .yarn.integrity is for a project.yaml with an added dependency to the project itself and that project.yaml no longer exists. Now when I try to link in the node_modules, yarn check --integrity fails with:
$ yarn check --integrity --ignore-scripts
yarn check v1.16.0
warning Integrity check: Top level patterns don't match
error Integrity check failed
error Found 1 errors.
info Visit https://yarnpkg.com/en/docs/cli/check for documentation about this command.
Comparing the generated .yarn.integrity file with one created by a direct yarn install confirms that the difference is the addition of the project i tself to topLevelPatterns.
It seems node_modules is generated in a way so as to be incompatible with integrity checks. Is there a way to use it in a way compatible with integrity checks?
As an aside, the use of --ignore-scripts also causes the flag to be added to .yarn.integrity and the integrity check to fail unless --ignore-scripts is also added to yarn check as above:
$ yarn check --integrity
yarn check v1.16.0
warning Integrity check: Flags don't match
error Integrity check failed
error Found 1 errors.
info Visit https://yarnpkg.com/en/docs/cli/check for documentation about this command.
I have a rails app I'm using
mkYarnPackage
with.mkYarnPackage
callsmkYarnModules
.mkYarnModules
usesworkspaceJSON
to create apackage.json
for a workspace to put everything under. This results in anode_modules
with a.yarn.integrity
file with an added dependency on my project (the project is copied intodeps
, and the generatedproject.yaml
sets up aworkspaces
using everything underdeps
). Thatproject.yaml
is discarded during theinstallPhase
so the generatednode_modules
'.yarn.integrity
is for aproject.yaml
with an added dependency to the project itself and thatproject.yaml
no longer exists. Now when I try to link in thenode_modules
,yarn check --integrity
fails with:Comparing the generated
.yarn.integrity
file with one created by a directyarn install
confirms that the difference is the addition of the project i tself totopLevelPatterns
.It seems
node_modules
is generated in a way so as to be incompatible with integrity checks. Is there a way to use it in a way compatible with integrity checks?As an aside, the use of
--ignore-scripts
also causes the flag to be added to .yarn.integrity and the integrity check to fail unless--ignore-scripts
is also added toyarn check
as above: