When running supertest-session in a project that uses Yarn PnP / Berry, the following two errors are reported:
supertest-session tried to access methods, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Required package: methods (via "methods")
Required by: supertest-session@virtual:640d59121dc50aef8c4e2e9c0fc24c425951c20d64b04f5476f7080bfeeaf953e8d8f92366ff62026e8f3b035a2de8fa49aa2900c07271fe8ad998892fded072#npm:4.0.0 (via .yarn/$$virtual/supertest-session-virtual-c7c934f209/0/cache/supertest-session-npm-4.0.0-30aab972e9-4b62b93e4e.zip/node_modules/supertest-session/)
supertest-session tried to access cookiejar, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Required package: cookiejar (via "cookiejar")
Required by: supertest-session@virtual:640d59121dc50aef8c4e2e9c0fc24c425951c20d64b04f5476f7080bfeeaf953e8d8f92366ff62026e8f3b035a2de8fa49aa2900c07271fe8ad998892fded072#npm:4.0.0 (via .yarn/$$virtual/supertest-session-virtual-c7c934f209/0/cache/supertest-session-npm-4.0.0-30aab972e9-4b62b93e4e.zip/node_modules/supertest-session/)
When running supertest-session in a project that uses Yarn PnP / Berry, the following two errors are reported:
This is using version
supertest@4.0.0
.Workaround
Add the following to
.yarnrc.yml
: