Intended outcome:
Trying to use yarn v2 with apollo should work
Actual outcome:
C:\dev\oz\.pnp.js:18050
throw firstError;
^
Error: A package is trying to access another package without the second one being listed as
a dependency of the first one
Required package: graphql (via "graphql")
Required by: @apollographql/apollo-tools@npm:0.4.1 (via /C:/dev/oz/.yarn/cache/@apollographql-apollo-tools-npm-0.4.1-b40a6f7b18-1.zip/node_modules/@apollographql/apollo-tools/lib/utilities/graphql.js)
at internalTools_makeError (C:\dev\oz\.pnp.js:17836:24)
at resolveToUnqualified (C:\dev\oz\.pnp.js:18804:19)
at resolveRequest (C:\dev\oz\.pnp.js:18881:27)
at Object.resolveRequest (C:\dev\oz\.pnp.js:18964:26)
at Function.external_module_default.a._resolveFilename (C:\dev\oz\.pnp.js:18041:29)
at Function.external_module_default.a._load (C:\dev\oz\.pnp.js:17943:50)
at Module.require (internal/modules/cjs/loader.js:1016:19)
at require (internal/modules/cjs/helpers.js:69:18)
at Object.<anonymous> (C:\dev\oz\.yarn\cache\@apollographql-apollo-tools-npm-0.4.1-b40a6f7b18-1.zip\node_modules\@apollographql\apollo-tools\src\utilities\graphql.ts:1:1)
at Module._compile (internal/modules/cjs/loader.js:1121:30) {
code: 'MODULE_NOT_FOUND',
pnpCode: 'UNDECLARED_DEPENDENCY',
data: {
request: 'graphql',
issuer: '/C:/dev/oz/.yarn/cache/@apollographql-apollo-tools-npm-0.4.1-b40a6f7b18-1.zip/node_modules/@apollographql/apollo-tools/lib/utilities/graphql.js',
issuerLocator: { name: '@apollographql/apollo-tools', reference: 'npm:0.4.1' },
dependencyName: 'graphql',
candidates: [ '@apollographql/apollo-tools', 'apollo-env' ]
}
}
How to reproduce the issue:
Make a project that just tries to import apollo-server and it'll throw the error.
package.json
{
"name": "test",
"scripts": {
"dev": "node index.js"
},
"dependencies": {
"apollo-server": "^2.9.12"
}
}
index.js
Versions
apollo-server@2.9.12
yarn@2.0.0-rc.12
node@v13.2.0
Intended outcome:
Trying to use yarn v2 with apollo should work
Actual outcome:
How to reproduce the issue:
Make a project that just tries to import
apollo-serverand it'll throw the error.package.json{ "name": "test", "scripts": { "dev": "node index.js" }, "dependencies": { "apollo-server": "^2.9.12" } }index.jsVersions
apollo-server@2.9.12yarn@2.0.0-rc.12node@v13.2.0