Describe the bug
Running yarn install in a project depending on cypress and using nodeLinker: "node-modules" fails with ➤ YN0009: │ cypress@npm:3.8.3 couldn't be built successfully (exit code 1, logs can be found here: /tmp/logfile-394W9pExI466nwo.log).
And it also hangs on the first install but that is already reported in https://github.com/yarnpkg/berry/issues/751
Apparently yarn thinks cypress requires an undeclared dependency minimist (used in postinstall) though this dependency is declared.
/tmp/logfile-394W9pExI466nwo.log
# This file contains the result of Yarn building a package (cypress@npm:3.8.2)
# Script name: postinstall
/home/eps1lon/Development/src/js/dom-accessibility-api/.pnp.js:23819
throw firstError;
^
Error: Something that got detected as your top-level application (because it doesn't seem to belong to any package) tried to access a package that is not declared in your dependencies
Required package: minimist (via "minimist")
Required by: /home/eps1lon/Development/src/js/dom-accessibility-api/node_modules/cypress/
Require stack:
- /home/eps1lon/Development/src/js/dom-accessibility-api/node_modules/cypress/index.js
at Object.makeError (/home/eps1lon/Development/src/js/dom-accessibility-api/.pnp.js:15564:24)
at resolveToUnqualified (/home/eps1lon/Development/src/js/dom-accessibility-api/.pnp.js:24420:35)
at resolveRequest (/home/eps1lon/Development/src/js/dom-accessibility-api/.pnp.js:24504:27)
at Object.resolveRequest (/home/eps1lon/Development/src/js/dom-accessibility-api/.pnp.js:24572:26)
at Function.module_1.Module._resolveFilename (/home/eps1lon/Development/src/js/dom-accessibility-api/.pnp.js:23802:34)
at Function.module_1.Module._load (/home/eps1lon/Development/src/js/dom-accessibility-api/.pnp.js:23687:40)
at Module.require (internal/modules/cjs/loader.js:838:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/eps1lon/Development/src/js/dom-accessibility-api/node_modules/cypress/index.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:945:30) {
code: 'MODULE_NOT_FOUND',
pnpCode: 'UNDECLARED_DEPENDENCY',
data: {
request: 'minimist',
issuer: '/home/eps1lon/Development/src/js/dom-accessibility-api/node_modules/cypress/',
dependencyName: 'minimist'
},
requireStack: [
'/home/eps1lon/Development/src/js/dom-accessibility-api/node_modules/cypress/index.js'
]
}
To Reproduce
``js repro
await yarn(init);
await yarn(add,cypress);
await yarn(config,set,nodeLinker,node-modules`);
await expect(yarn(install)).resolves.toBeTruthy();
```
Environment if relevant (please complete the following information):
Additional context
Switching to node_modules because of https://github.com/prettier/prettier-vscode/issues/1221
The reproduction case in your issue seems broken (ie it neither pass nor fail due to throwing an unmanaged exception):
Error: Command failed: /usr/bin/node /github/workspace/scripts/actions/../run-yarn.js add cypress
Usage Error: No project found in /tmp/tmp-27K6sWeVR59bCK
$ yarn add [--json] [-E,--exact] [-T,--tilde] [-C,--caret] [-D,--dev] [-P,--peer] [--prefer-dev] [-i,--interactive] [--cached] ...
at ChildProcess.exithandler (child_process.js:295:12)
at ChildProcess.emit (events.js:210:5)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
Remember: any non-Jest exceptions will cause the test to be reported as broken. If you expect something to pass without throwing, you must wrap it into something like await expect(...).resolves.toBeTruthy(). If you instead expect something to throw, you need to wrap it into await expect(...).rejects.toThrow().
The reproduction case in your issue seems broken (ie it neither pass nor fail due to throwing an unmanaged exception):
Error: Command failed: /usr/bin/node /github/workspace/scripts/actions/../run-yarn.js yarn config set nodeLinker "node-modules"
Usage Error: Couldn't find a script named "yarn".
$ yarn run <scriptName> ...
at ChildProcess.exithandler (child_process.js:295:12)
at ChildProcess.emit (events.js:210:5)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
Remember: any non-Jest exceptions will cause the test to be reported as broken. If you expect something to pass without throwing, you must wrap it into something like await expect(...).resolves.toBeTruthy(). If you instead expect something to throw, you need to wrap it into await expect(...).rejects.toThrow().
The reproduction case in your issue seems broken (ie it neither pass nor fail due to throwing an unmanaged exception):
Error: Command failed: /usr/bin/node /github/workspace/scripts/actions/../run-yarn.js install
[94m➤[39m [90mYN0000[39m: ┌ Resolution step
[94m➤[39m [90mYN0000[39m: └ Completed in 0.06s
[94m➤[39m [90mYN0000[39m: ┌ Fetch step
[94m➤[39m [90mYN0000[39m: └ Completed in 0.46s
[94m➤[39m [90mYN0000[39m: ┌ Link step
[91m➤[39m YN0012: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m isn't supported by any available linker
[94m➤[39m [90mYN0000[39m: └ Completed in 0.02s
[91m➤[39m YN0000: Failed with errors in 0.55s
at ChildProcess.exithandler (child_process.js:295:12)
at ChildProcess.emit (events.js:210:5)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
Remember: any non-Jest exceptions will cause the test to be reported as broken. If you expect something to pass without throwing, you must wrap it into something like await expect(...).resolves.toBeTruthy(). If you instead expect something to throw, you need to wrap it into await expect(...).rejects.toThrow().
Discovered https://next.yarnpkg.com/advanced/sherlock#can-i-develop-my-reproduction-offline. Give me a sec :)
That should do it. Even includes the full log. Very nice.
Error: Command failed: /home/eps1lon/.nvm/versions/node/v10.16.3/bin/node /home/eps1lon/Development/src/js/forks/berry/scripts/actions/../run-yarn.js install
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0.03s
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0.17s
➤ YN0000: ┌ Link step
➤ YN0007: │ cypress@npm:3.8.3 must be built because it never did before or the last one failed
➤ YN0000: │ cypress@npm:3.8.3 STDERR /tmp/tmp-16064MWTMwpKFCA6T/.pnp.js:15510
➤ YN0000: │ cypress@npm:3.8.3 STDERR throw firstError;
➤ YN0000: │ cypress@npm:3.8.3 STDERR ^
➤ YN0000: │ cypress@npm:3.8.3 STDERR
➤ YN0000: │ cypress@npm:3.8.3 STDERR Error: Something that got detected as your top-level application (because it doesn't seem to belong to any package) tried to access a package that is not declared in your dependencies
➤ YN0000: │ cypress@npm:3.8.3 STDERR
➤ YN0000: │ cypress@npm:3.8.3 STDERR Required package: minimist (via "minimist")
➤ YN0000: │ cypress@npm:3.8.3 STDERR Required by: /tmp/tmp-16064MWTMwpKFCA6T/node_modules/cypress/
➤ YN0000: │ cypress@npm:3.8.3 STDERR
➤ YN0000: │ cypress@npm:3.8.3 STDERR Require stack:
➤ YN0000: │ cypress@npm:3.8.3 STDERR - /tmp/tmp-16064MWTMwpKFCA6T/node_modules/cypress/index.js
➤ YN0000: │ cypress@npm:3.8.3 STDERR at Object.makeError (/tmp/tmp-16064MWTMwpKFCA6T/.pnp.js:7255:24)
➤ YN0000: │ cypress@npm:3.8.3 STDERR at resolveToUnqualified (/tmp/tmp-16064MWTMwpKFCA6T/.pnp.js:16111:35)
➤ YN0000: │ cypress@npm:3.8.3 STDERR at resolveRequest (/tmp/tmp-16064MWTMwpKFCA6T/.pnp.js:16195:27)
➤ YN0000: │ cypress@npm:3.8.3 STDERR at Object.resolveRequest.maybeLog [as resolveRequest] (/tmp/tmp-16064MWTMwpKFCA6T/.pnp.js:16263:26)
➤ YN0000: │ cypress@npm:3.8.3 STDERR at Function.module_1.Module._resolveFilename (/tmp/tmp-16064MWTMwpKFCA6T/.pnp.js:15493:34)
➤ YN0000: │ cypress@npm:3.8.3 STDERR at Function.module_1.Module._load (/tmp/tmp-16064MWTMwpKFCA6T/.pnp.js:15378:40)
➤ YN0000: │ cypress@npm:3.8.3 STDERR at Module.require (internal/modules/cjs/loader.js:692:17)
➤ YN0000: │ cypress@npm:3.8.3 STDERR at require (internal/modules/cjs/helpers.js:25:18)
➤ YN0000: │ cypress@npm:3.8.3 STDERR at Object.<anonymous> (/tmp/tmp-16064MWTMwpKFCA6T/node_modules/cypress/index.js:3:16)
➤ YN0000: │ cypress@npm:3.8.3 STDERR at Module._compile (internal/modules/cjs/loader.js:778:30)
➤ YN0009: │ cypress@npm:3.8.3 couldn't be built successfully (exit code 1, logs can be found here: /tmp/logfile-1722786XLXW0Mh6G2.log)
➤ YN0000: └ Completed in 7.58s
➤ YN0000: Failed with errors in 7.8s
at ChildProcess.exithandler (child_process.js:294:12)
at ChildProcess.emit (events.js:198:13)
at maybeClose (internal/child_process.js:982:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)⏎
The reproduction case in your issue seems broken (ie it neither pass nor fail due to throwing an unmanaged exception):
Error: Command failed: /usr/bin/node /github/workspace/scripts/actions/../run-yarn.js install
[94m➤[39m [90mYN0000[39m: ┌ Resolution step
[94m➤[39m [90mYN0000[39m: └ Completed in 0.05s
[94m➤[39m [90mYN0000[39m: ┌ Fetch step
[94m➤[39m [90mYN0000[39m: └ Completed in 0.42s
[94m➤[39m [90mYN0000[39m: ┌ Link step
[94m➤[39m YN0007: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m must be built because it never did before or the last one failed
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m /tmp/tmp-27Z1GS1dhNdQ0G/.pnp.js:15510
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m throw firstError;
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m ^
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m Error: Something that got detected as your top-level application (because it doesn't seem to belong to any package) tried to access a package that is not declared in your dependencies
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m Required package: minimist (via "minimist")
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m Required by: /tmp/tmp-27Z1GS1dhNdQ0G/node_modules/cypress/
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m Require stack:
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m - /tmp/tmp-27Z1GS1dhNdQ0G/node_modules/cypress/index.js
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m at Object.makeError (/tmp/tmp-27Z1GS1dhNdQ0G/.pnp.js:7255:24)
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m at resolveToUnqualified (/tmp/tmp-27Z1GS1dhNdQ0G/.pnp.js:16111:35)
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m at resolveRequest (/tmp/tmp-27Z1GS1dhNdQ0G/.pnp.js:16195:27)
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m at Object.resolveRequest (/tmp/tmp-27Z1GS1dhNdQ0G/.pnp.js:16263:26)
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m at Function.module_1.Module._resolveFilename (/tmp/tmp-27Z1GS1dhNdQ0G/.pnp.js:15493:34)
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m at Function.module_1.Module._load (/tmp/tmp-27Z1GS1dhNdQ0G/.pnp.js:15378:40)
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m at Module.require (internal/modules/cjs/loader.js:852:19)
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m at require (internal/modules/cjs/helpers.js:74:18)
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m at Object.<anonymous> (/tmp/tmp-27Z1GS1dhNdQ0G/node_modules/cypress/index.js:3:16)
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m at Module._compile (internal/modules/cjs/loader.js:959:30) {
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m code: 'MODULE_NOT_FOUND',
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m pnpCode: 'UNDECLARED_DEPENDENCY',
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m data: {
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m request: 'minimist',
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m issuer: '/tmp/tmp-27Z1GS1dhNdQ0G/node_modules/cypress/',
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m dependencyName: 'minimist'
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m },
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m requireStack: [ '/tmp/tmp-27Z1GS1dhNdQ0G/node_modules/cypress/index.js' ]
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m }
[91m➤[39m YN0009: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m couldn't be built successfully (exit code [38;5;220m1[39m, logs can be found here: [38;5;170m/tmp/logfile-83hfiFSdQZKEXz.log[39m)
[94m➤[39m [90mYN0000[39m: └ Completed in 11.61s
[91m➤[39m YN0000: Failed with errors in 12.09s
at ChildProcess.exithandler (child_process.js:295:12)
at ChildProcess.emit (events.js:210:5)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
Remember: any non-Jest exceptions will cause the test to be reported as broken. If you expect something to pass without throwing, you must wrap it into something like await expect(...).resolves.toBeTruthy(). If you instead expect something to throw, you need to wrap it into await expect(...).rejects.toThrow().
Ok the arrange and act part I got. No idea how the assertion should look to be considered "reproducible".
Either way I don't have more time. Hope this is sufficient.
We couldn't reproduce your issue (all the assertions passed on master).
We couldn't reproduce your issue (all the assertions passed on master).
@eps1lon Actually I cannot reproduce this:
$ yarn set version berry
➤ YN0000: Found matching release with rc
➤ YN0000: Downloading https://github.com/yarnpkg/berry/raw/master/packages/yarnpkg-cli/bin/yarn.js
➤ YN0000: Saving the new release in .yarn/releases/yarn-rc.js
➤ YN0000: Done in 2.91s
$ yarn
yarn
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0.04s
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0.17s
➤ YN0000: ┌ Link step
➤ YN0007: │ cypress@npm:3.8.2 must be built because it never did before or the last one failed
➤ YN0000: └ Completed in 5.54s
➤ YN0000: Done in 5.75s
P.S. same with [email protected]:
$ yarn add cypress
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 4.27s
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0.63s
➤ YN0000: ┌ Link step
➤ YN0007: │ cypress@npm:3.8.3 must be built because it never did before or the last one failed
➤ YN0000: └ Completed in 6.3s
➤ YN0000: Done in 11.22s
@eps1lon an await was missing, hence the passing yarnbot even though it should have fail.
@larixer try running yarn sherlock 754 in the repo, it should throw the error.
This issue reproduces on master:
Error: expect(received).resolves.toBeTruthy()
Received promise rejected instead of resolved
Rejected to value: [Error: Command failed: /usr/bin/node /github/workspace/scripts/actions/../run-yarn.js install
[94m➤[39m [90mYN0000[39m: ┌ Resolution step
[94m➤[39m [90mYN0000[39m: └ Completed in 0.05s
[94m➤[39m [90mYN0000[39m: ┌ Fetch step
[94m➤[39m [90mYN0000[39m: └ Completed in 0.32s
[94m➤[39m [90mYN0000[39m: ┌ Link step
[94m➤[39m YN0007: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m must be built because it never did before or the last one failed
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m /tmp/tmp-277gRdCc7fOJGM/.pnp.js:15510
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m throw firstError;
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m ^
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m Error: Something that got detected as your top-level application (because it doesn't seem to belong to any package) tried to access a package that is not declared in your dependencies
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m Required package: minimist (via "minimist")
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m Required by: /tmp/tmp-277gRdCc7fOJGM/node_modules/cypress/
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m Require stack:
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m - /tmp/tmp-277gRdCc7fOJGM/node_modules/cypress/index.js
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m at Object.makeError (/tmp/tmp-277gRdCc7fOJGM/.pnp.js:7255:24)
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m at resolveToUnqualified (/tmp/tmp-277gRdCc7fOJGM/.pnp.js:16111:35)
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m at resolveRequest (/tmp/tmp-277gRdCc7fOJGM/.pnp.js:16195:27)
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m at Object.resolveRequest (/tmp/tmp-277gRdCc7fOJGM/.pnp.js:16263:26)
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m at Function.module_1.Module._resolveFilename (/tmp/tmp-277gRdCc7fOJGM/.pnp.js:15493:34)
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m at Function.module_1.Module._load (/tmp/tmp-277gRdCc7fOJGM/.pnp.js:15378:40)
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m at Module.require (internal/modules/cjs/loader.js:852:19)
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m at require (internal/modules/cjs/helpers.js:74:18)
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m at Object.<anonymous> (/tmp/tmp-277gRdCc7fOJGM/node_modules/cypress/index.js:3:16)
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m at Module._compile (internal/modules/cjs/loader.js:959:30) {
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m code: 'MODULE_NOT_FOUND',
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m pnpCode: 'UNDECLARED_DEPENDENCY',
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m data: {
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m request: 'minimist',
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m issuer: '/tmp/tmp-277gRdCc7fOJGM/node_modules/cypress/',
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m dependencyName: 'minimist'
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m },
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m requireStack: [ '/tmp/tmp-277gRdCc7fOJGM/node_modules/cypress/index.js' ]
[94m➤[39m [90mYN0000[39m: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m [31mSTDERR[39m }
[91m➤[39m YN0009: │ [38;5;173mcypress[39m[38;5;111m@[39m[38;5;111mnpm:3.8.3[39m couldn't be built successfully (exit code [38;5;220m1[39m, logs can be found here: [38;5;170m/tmp/logfile-83DgzJFtIgXoXC.log[39m)
[94m➤[39m [90mYN0000[39m: └ Completed in 12s
[91m➤[39m YN0000: Failed with errors in 12.39s
]
at expect (/github/workspace/.yarn/cache/expect-npm-24.8.0-8c7640c562-1.zip/node_modules/expect/build/index.js:138:15)
at module.exports (evalmachine.<anonymous>:6:7)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async /github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-1.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:56:13
at async executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-1.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:17:16)
at async Object.executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-1.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:24:12)
at async ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-1.zip/node_modules/@arcanis/sherlock/lib/commands/exec.js:25:38)
at async ExecCommand.validateAndExecute (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-1.zip/node_modules/clipanion/lib/advanced/Command.js:161:26)
at async Cli.run (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-1.zip/node_modules/clipanion/lib/advanced/Cli.js:74:24)
at async Cli.runExit (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-1.zip/node_modules/clipanion/lib/advanced/Cli.js:83:28)
@arcanis Yeah, I was able to reproduce this. according to the stack trace from the logfile:
➤ YN0000: │ cypress@npm:3.8.3 STDERR Error: Something that got detected as your top-level application (because it doesn't seem to belong to any package) tried to access a package that is not declared in your dependencies
➤ YN0000: │ cypress@npm:3.8.3 STDERR
➤ YN0000: │ cypress@npm:3.8.3 STDERR Required package: minimist (via "minimist")
➤ YN0000: │ cypress@npm:3.8.3 STDERR Required by: /tmp/tmp-16064MWTMwpKFCA6T/node_modules/cypress/
➤ YN0000: │ cypress@npm:3.8.3 STDERR
➤ YN0000: │ cypress@npm:3.8.3 STDERR Require stack:
➤ YN0000: │ cypress@npm:3.8.3 STDERR - /tmp/tmp-16064MWTMwpKFCA6T/node_modules/cypress/index.js
➤ YN0000: │ cypress@npm:3.8.3 STDERR at Object.makeError (/tmp/tmp-16064MWTMwpKFCA6T/.pnp.js:7255:24)
➤ YN0000: │ cypress@npm:3.8.3 STDERR at resolveToUnqualified (/tmp/tmp-16064MWTMwpKFCA6T/.pnp.js:16111:35)
➤ YN0000: │ cypress@npm:3.8.3 STDERR at resolveRequest (/tmp/tmp-16064MWTMwpKFCA6T/.pnp.js:16195:27)
➤ YN0000: │ cypress@npm:3.8.3 STDERR at Object.resolveRequest.maybeLog [as resolveRequest] (/tmp/tmp-16064MWTMwpKFCA6T/.pnp.js:16263:26)
➤ YN0000: │ cypress@npm:3.8.3 STDERR at Function.module_1.Module._resolveFilename (/tmp/tmp-16064MWTMwpKFCA6T/.pnp.js:15493:34)
➤ YN0000: │ cypress@npm:3.8.3 STDERR at Function.module_1.Module._load (/tmp/tmp-16064MWTMwpKFCA6T/.pnp.js:15378:40)
➤ YN0000: │ cypress@npm:3.8.3 STDERR at Module.require (internal/modules/cjs/loader.js:692:17)
➤ YN0000: │ cypress@npm:3.8.3 STDERR at require (internal/modules/cjs/helpers.js:25:18)
➤ YN0000: │ cypress@npm:3.8.3 STDERR at Object.<anonymous> (/tmp/tmp-16064MWTMwpKFCA6T/node_modules/cypress/index.js:3:16)
➤ YN0000: │ cypress@npm:3.8.3 STDERR at Module._compile (internal/modules/cjs/loader.js:778:30)
➤ YN0009: │ cypress@npm:3.8.3 couldn't be built successfully (exit code 1, logs can be found here: /tmp/logfile-1722786XLXW0Mh6G2.log)
➤ YN0000: └ Completed in 7.58s
it is really understood what the problem is. The .pnp.js file was generated during yarn init (because the default linker is pnp) and then it was used to resolve dependencies, even though the nm-linker become active. Its understood that if there were no .pnp.js everything would have worked. But what if the case is: there is a .pnp.js, but nodeLinker is node-modules?
We couldn't reproduce your issue (all the assertions passed on master).
Good bot 🥰
Most helpful comment
That should do it. Even includes the full log. Very nice.