Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

razzle-plugin-typescript fails to start with yarn start (v2 with pnp). dependency issues error. #1171

Closed
laurencefass opened this issue Dec 12, 2019 · 1 comment

Comments

@laurencefass
Copy link

I am converting some of my projects to yarn v2 with default pnp. I have tried to convert existing razzle project working fine with yarn v1.

Following simple process to convert to y2pnp the yarn install works but yarn start fails with following information:

bash-5.0# yarn start
 WAIT  Compiling...

Error: A package is trying to access another package without the second one being listed as a dependency of the first one

Required package: razzle-dev-utils (via "razzle-dev-utils/makeLoaderFinder")
Required by: razzle-plugin-typescript@virtual:1287794b08069eb209de53a9821d237ec07a610c11ee62b25f96a421c06a71a0115b29bb19d67746b747063ca0ab0c8b62a92c34471b47cb9a6469cec13d7306#npm:3.0.0 (via /app/razzle/typescript/.yarn/virtual/razzle-plugin-typescript-virtual-3099255a7b/0/cache/razzle-plugin-typescript-npm-3.0.0-7b139b2d51-1.zip/node_modules/razzle-plugin-typescript/helpers.js)

Require stack:
- /app/razzle/typescript/.yarn/virtual/razzle-plugin-typescript-virtual-3099255a7b/0/cache/razzle-plugin-typescript-npm-3.0.0-7b139b2d51-1.zip/node_modules/razzle-plugin-typescript/helpers.js
- /app/razzle/typescript/.yarn/virtual/razzle-plugin-typescript-virtual-3099255a7b/0/cache/razzle-plugin-typescript-npm-3.0.0-7b139b2d51-1.zip/node_modules/razzle-plugin-typescript/index.js
- /app/razzle/typescript/.yarn/cache/razzle-npm-3.0.0-fde1122e5a-1.zip/node_modules/razzle/config/runPlugin.js
- /app/razzle/typescript/.yarn/cache/razzle-npm-3.0.0-fde1122e5a-1.zip/node_modules/razzle/config/createConfig.js
- /app/razzle/typescript/.yarn/cache/razzle-npm-3.0.0-fde1122e5a-1.zip/node_modules/razzle/scripts/start.js
    at internalTools_makeError (/app/razzle/typescript/.pnp.js:22043:24)
    at resolveToUnqualified (/app/razzle/typescript/.pnp.js:23023:19)
    at resolveRequest (/app/razzle/typescript/.pnp.js:23100:27)
    at Object.resolveRequest (/app/razzle/typescript/.pnp.js:23196:26)
    at Function.external_module_default.a._resolveFilename (/app/razzle/typescript/.pnp.js:22257:29)
    at Function.external_module_default.a._load (/app/razzle/typescript/.pnp.js:22159:50)
    at Module.require (internal/modules/cjs/loader.js:1023:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/app/razzle/typescript/.yarn/virtual/razzle-plugin-typescript-virtual-3099255a7b/0/cache/razzle-plugin-typescript-npm-3.0.0-7b139b2d51-1.zip/node_modules/razzle-plugin-typescript/helpers.js:2:26)
    at Module._compile (internal/modules/cjs/loader.js:1128:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:983:32)
    at Function.external_module_default.a._load (/app/razzle/typescript/.pnp.js:22179:14)
    at Module.require (internal/modules/cjs/loader.js:1023:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/app/razzle/typescript/.yarn/virtual/razzle-plugin-typescript-virtual-3099255a7b/0/cache/razzle-plugin-typescript-npm-3.0.0-7b139b2d51-1.zip/node_modules/razzle-plugin-typescript/index.js:4:31) {
  code: 'MODULE_NOT_FOUND',
  pnpCode: 'UNDECLARED_DEPENDENCY',
  data: {
    request: 'razzle-dev-utils/makeLoaderFinder',
    issuer: '/app/razzle/typescript/.yarn/virtual/razzle-plugin-typescript-virtual-3099255a7b/0/cache/razzle-plugin-typescript-npm-3.0.0-7b139b2d51-1.zip/node_modules/razzle-plugin-typescript/helpers.js',
    issuerLocator: {
      name: 'razzle-plugin-typescript',
      reference: 'virtual:1287794b08069eb209de53a9821d237ec07a610c11ee62b25f96a421c06a71a0115b29bb19d67746b747063ca0ab0c8b62a92c34471b47cb9a6469cec13d7306#npm:3.0.0'
    },
    dependencyName: 'razzle-dev-utils',
    candidates: [
      'razzle-plugin-typescript',
      'fork-ts-checker-webpack-plugin',
      'ts-loader',
      'typescript'
    ]
  },
  requireStack: [
    '/app/razzle/typescript/.yarn/virtual/razzle-plugin-typescript-virtual-3099255a7b/0/cache/razzle-plugin-typescript-npm-3.0.0-7b139b2d51-1.zip/node_modules/razzle-plugin-typescript/helpers.js',
    '/app/razzle/typescript/.yarn/virtual/razzle-plugin-typescript-virtual-3099255a7b/0/cache/razzle-plugin-typescript-npm-3.0.0-7b139b2d51-1.zip/node_modules/razzle-plugin-typescript/index.js',
    '/app/razzle/typescript/.yarn/cache/razzle-npm-3.0.0-fde1122e5a-1.zip/node_modules/razzle/config/runPlugin.js',
    '/app/razzle/typescript/.yarn/cache/razzle-npm-3.0.0-fde1122e5a-1.zip/node_modules/razzle/config/createConfig.js',
    '/app/razzle/typescript/.yarn/cache/razzle-npm-3.0.0-fde1122e5a-1.zip/node_modules/razzle/scripts/start.js'
  ]
}
bash-5.0# yarn add razzle-plugin-typescript
➤ YN0000: ┌ Resolution step
➤ YN0002: │ razzle-plugin-proxy@npm:1.3.3 doesn't provide webpack@1 || 2 || 3 || 4 requested by string-replace-loader@npm:2.2.0
➤ YN0002: │ razzle-examples-with-typescript@workspace:. doesn't provide jquery@1.9.1 - 3 requested by bootstrap@npm:4.4.1
➤ YN0002: │ razzle-examples-with-typescript@workspace:. doesn't provide popper.js@^1.16.0 requested by bootstrap@npm:4.4.1
➤ YN0002: │ razzle-examples-with-typescript@workspace:. doesn't provide jest@>=22 <24 requested by ts-jest@npm:23.10.5
➤ YN0002: │ razzle-plugin-typescript@npm:3.0.0 [12877] doesn't provide tslint@^4.0.0 || ^5.0.0 requested by fork-ts-checker-webpack-plugin@npm:0.4.15
➤ YN0002: │ razzle-plugin-typescript@npm:3.0.0 [12877] doesn't provide webpack@^2.3.0 || ^3.0.0 || ^4.0.0 requested by fork-ts-checker-webpack-plugin@npm:0.4.15
➤ YN0000: └ Completed in 0.71s
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 2.63s
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed in 3.51s
➤ YN0000: Done with warnings in 7.02s
bash-5.0# yarn start
 WAIT  Compiling...

Error: A package is trying to access another package without the second one being listed as a dependency of the first one

Required package: razzle-dev-utils (via "razzle-dev-utils/makeLoaderFinder")
Required by: razzle-plugin-typescript@virtual:1287794b08069eb209de53a9821d237ec07a610c11ee62b25f96a421c06a71a0115b29bb19d67746b747063ca0ab0c8b62a92c34471b47cb9a6469cec13d7306#npm:3.0.0 (via /app/razzle/typescript/.yarn/virtual/razzle-plugin-typescript-virtual-3099255a7b/0/cache/razzle-plugin-typescript-npm-3.0.0-7b139b2d51-1.zip/node_modules/razzle-plugin-typescript/helpers.js)

Require stack:
- /app/razzle/typescript/.yarn/virtual/razzle-plugin-typescript-virtual-3099255a7b/0/cache/razzle-plugin-typescript-npm-3.0.0-7b139b2d51-1.zip/node_modules/razzle-plugin-typescript/helpers.js
- /app/razzle/typescript/.yarn/virtual/razzle-plugin-typescript-virtual-3099255a7b/0/cache/razzle-plugin-typescript-npm-3.0.0-7b139b2d51-1.zip/node_modules/razzle-plugin-typescript/index.js
- /app/razzle/typescript/.yarn/cache/razzle-npm-3.0.0-fde1122e5a-1.zip/node_modules/razzle/config/runPlugin.js
- /app/razzle/typescript/.yarn/cache/razzle-npm-3.0.0-fde1122e5a-1.zip/node_modules/razzle/config/createConfig.js
- /app/razzle/typescript/.yarn/cache/razzle-npm-3.0.0-fde1122e5a-1.zip/node_modules/razzle/scripts/start.js
    at internalTools_makeError (/app/razzle/typescript/.pnp.js:22043:24)
    at resolveToUnqualified (/app/razzle/typescript/.pnp.js:23023:19)
    at resolveRequest (/app/razzle/typescript/.pnp.js:23100:27)
    at Object.resolveRequest (/app/razzle/typescript/.pnp.js:23196:26)
    at Function.external_module_default.a._resolveFilename (/app/razzle/typescript/.pnp.js:22257:29)
    at Function.external_module_default.a._load (/app/razzle/typescript/.pnp.js:22159:50)
    at Module.require (internal/modules/cjs/loader.js:1023:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/app/razzle/typescript/.yarn/virtual/razzle-plugin-typescript-virtual-3099255a7b/0/cache/razzle-plugin-typescript-npm-3.0.0-7b139b2d51-1.zip/node_modules/razzle-plugin-typescript/helpers.js:2:26)
    at Module._compile (internal/modules/cjs/loader.js:1128:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:983:32)
    at Function.external_module_default.a._load (/app/razzle/typescript/.pnp.js:22179:14)
    at Module.require (internal/modules/cjs/loader.js:1023:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/app/razzle/typescript/.yarn/virtual/razzle-plugin-typescript-virtual-3099255a7b/0/cache/razzle-plugin-typescript-npm-3.0.0-7b139b2d51-1.zip/node_modules/razzle-plugin-typescript/index.js:4:31) {
  code: 'MODULE_NOT_FOUND',
  pnpCode: 'UNDECLARED_DEPENDENCY',
  data: {
    request: 'razzle-dev-utils/makeLoaderFinder',
    issuer: '/app/razzle/typescript/.yarn/virtual/razzle-plugin-typescript-virtual-3099255a7b/0/cache/razzle-plugin-typescript-npm-3.0.0-7b139b2d51-1.zip/node_modules/razzle-plugin-typescript/helpers.js',
    issuerLocator: {
      name: 'razzle-plugin-typescript',
      reference: 'virtual:1287794b08069eb209de53a9821d237ec07a610c11ee62b25f96a421c06a71a0115b29bb19d67746b747063ca0ab0c8b62a92c34471b47cb9a6469cec13d7306#npm:3.0.0'
    },
    dependencyName: 'razzle-dev-utils',
    candidates: [
      'razzle-plugin-typescript',
      'fork-ts-checker-webpack-plugin',
      'ts-loader',
      'typescript'
    ]
  },
  requireStack: [
    '/app/razzle/typescript/.yarn/virtual/razzle-plugin-typescript-virtual-3099255a7b/0/cache/razzle-plugin-typescript-npm-3.0.0-7b139b2d51-1.zip/node_modules/razzle-plugin-typescript/helpers.js',
    '/app/razzle/typescript/.yarn/virtual/razzle-plugin-typescript-virtual-3099255a7b/0/cache/razzle-plugin-typescript-npm-3.0.0-7b139b2d51-1.zip/node_modules/razzle-plugin-typescript/index.js',
    '/app/razzle/typescript/.yarn/cache/razzle-npm-3.0.0-fde1122e5a-1.zip/node_modules/razzle/config/runPlugin.js',
    '/app/razzle/typescript/.yarn/cache/razzle-npm-3.0.0-fde1122e5a-1.zip/node_modules/razzle/config/createConfig.js',
    '/app/razzle/typescript/.yarn/cache/razzle-npm-3.0.0-fde1122e5a-1.zip/node_modules/razzle/scripts/start.js'
  ]
}

thanks

@fivethreeo
Copy link
Collaborator

#896

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants