blitz-js / legacy-framework

MIT License
3 stars 2 forks source link

Error: blitz tried to access cross-spawn but it isn't declared in its dependencies with yarn 2.4.1 #251

Closed AntoineGst closed 3 years ago

AntoineGst commented 3 years ago

What is the problem?

I tried to install blitz with yarn version 2.4.1 (yarn dlx blitz), and I received this error message :

Error: blitz tried to access cross-spawn, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

and I don't see cross-spawn listed in the dependencies of the package.json file (https://github.com/blitz-js/blitz/blob/v0.35.2/packages/blitz/package.json)

See the complete message below.

Thank you :)

Paste all your error logs here:

➤ YN0000: ┌ Resolution step
➤ YN0032: │ sodium-native@npm:3.2.1: Implicit dependencies on node-gyp are discouraged
➤ YN0061: │ babel-eslint@npm:10.1.0 is deprecated: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
➤ YN0032: │ evp_bytestokey@npm:1.0.3: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ fsevents@npm:2.3.2: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ fsevents@npm:2.3.2: Implicit dependencies on node-gyp are discouraged
➤ YN0061: │ urix@npm:0.1.0 is deprecated: Please see https://github.com/lydell/urix#deprecated
➤ YN0061: │ resolve-url@npm:0.2.1 is deprecated: https://github.com/lydell/resolve-url#deprecated
➤ YN0002: │ @blitzjs/babel-preset@npm:0.35.2 doesn't provide next (p1754d), requested by babel-plugin-superjson-next
➤ YN0002: │ @blitzjs/babel-preset@npm:0.35.2 doesn't provide superjson (pfb17b), requested by babel-plugin-superjson-next
➤ YN0002: │ @blitzjs/cli@npm:0.35.2 doesn't provide typescript (p641d8), requested by ts-node
➤ YN0002: │ @blitzjs/core@npm:0.35.2 doesn't provide react (p03a52), requested by @blitzjs/next
➤ YN0002: │ @blitzjs/core@npm:0.35.2 doesn't provide react (pf76c4), requested by react-query
➤ YN0002: │ @blitzjs/core@npm:0.35.2 doesn't provide react-dom (p98e19), requested by @blitzjs/next
➤ YN0002: │ @blitzjs/core@npm:0.35.2 doesn't provide webpack (ped349), requested by null-loader
➤ YN0002: │ @blitzjs/generator@npm:0.35.2 doesn't provide @babel/preset-env (pee7b9), requested by jscodeshift
➤ YN0002: │ blitz@npm:0.35.2 doesn't provide react (p09e2d), requested by @testing-library/react-hooks
➤ YN0002: │ blitz@npm:0.35.2 doesn't provide react (pb9e51), requested by @testing-library/react
➤ YN0002: │ blitz@npm:0.35.2 doesn't provide react (p20629), requested by react-test-renderer
➤ YN0002: │ blitz@npm:0.35.2 doesn't provide react-dom (p22891), requested by @testing-library/react
➤ YN0002: │ blitz@npm:0.35.2 doesn't provide typescript (p905e8), requested by ts-jest
➤ YN0002: │ eslint-config-blitz@npm:0.35.2 doesn't provide eslint (p333e9), requested by @typescript-eslint/eslint-plugin
➤ YN0002: │ eslint-config-blitz@npm:0.35.2 doesn't provide eslint (pf7f9d), requested by @typescript-eslint/parser
➤ YN0002: │ eslint-config-blitz@npm:0.35.2 doesn't provide eslint (p7c920), requested by babel-eslint
➤ YN0002: │ eslint-config-blitz@npm:0.35.2 doesn't provide eslint (pafa8c), requested by eslint-config-react-app
➤ YN0002: │ eslint-config-blitz@npm:0.35.2 doesn't provide eslint (p4ba9a), requested by eslint-plugin-cypress
➤ YN0002: │ eslint-config-blitz@npm:0.35.2 doesn't provide eslint (pfcb13), requested by eslint-plugin-flowtype
➤ YN0002: │ eslint-config-blitz@npm:0.35.2 doesn't provide eslint (pa6e49), requested by eslint-plugin-import
➤ YN0002: │ eslint-config-blitz@npm:0.35.2 doesn't provide eslint (pafa59), requested by eslint-plugin-jsx-a11y
➤ YN0002: │ eslint-config-blitz@npm:0.35.2 doesn't provide eslint (p84d4f), requested by eslint-plugin-react-hooks
➤ YN0002: │ eslint-config-blitz@npm:0.35.2 doesn't provide eslint (p33708), requested by eslint-plugin-react
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 10m 25s
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 332ms
➤ YN0000: ┌ Link step
➤ YN0007: │ blitz@npm:0.35.2 must be built because it never did before or the last one failed
➤ YN0007: │ esbuild@npm:0.11.23 must be built because it never did before or the last one failed
➤ YN0007: │ @prisma/engines@npm:2.19.0-39.c1455d0b443d66b0d9db9bcb1bb9ee0d5bbc511d must be built because it never did before or the last one failed
➤ YN0007: │ core-js@npm:3.13.0 must be built because it never did before or the last one failed
➤ YN0007: │ sodium-native@npm:3.2.1 must be built because it never did before or the last one failed
➤ YN0007: │ core-js-pure@npm:3.13.0 must be built because it never did before or the last one failed
➤ YN0000: └ Completed in 3s 869ms
➤ YN0000: Done with warnings in 10m 30s

/private/var/folders/27/t3qhnmxd5h3f56gnsbdt479m0000gn/T/xfs-fefd6b15/dlx-8168/.pnp.js:19225
    throw firstError;
    ^

Error: blitz tried to access cross-spawn, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: cross-spawn (via "cross-spawn")
Required by: blitz@npm:0.35.2 (via /private/var/folders/27/t3qhnmxd5h3f56gnsbdt479m0000gn/T/xfs-fefd6b15/dlx-8168/.yarn/unplugged/blitz-npm-0.35.2-1772aafa05/node_modules/blitz/bin/)

Require stack:
- /private/var/folders/27/t3qhnmxd5h3f56gnsbdt479m0000gn/T/xfs-fefd6b15/dlx-8168/.yarn/unplugged/blitz-npm-0.35.2-1772aafa05/node_modules/blitz/bin/blitz
    at internalTools_makeError (/private/var/folders/27/t3qhnmxd5h3f56gnsbdt479m0000gn/T/xfs-fefd6b15/dlx-8168/.pnp.js:18969:34)
    at resolveToUnqualified (/private/var/folders/27/t3qhnmxd5h3f56gnsbdt479m0000gn/T/xfs-fefd6b15/dlx-8168/.pnp.js:19934:23)
    at resolveRequest (/private/var/folders/27/t3qhnmxd5h3f56gnsbdt479m0000gn/T/xfs-fefd6b15/dlx-8168/.pnp.js:20026:29)
    at Object.resolveRequest (/private/var/folders/27/t3qhnmxd5h3f56gnsbdt479m0000gn/T/xfs-fefd6b15/dlx-8168/.pnp.js:20104:26)
    at Function.external_module_.Module._resolveFilename (/private/var/folders/27/t3qhnmxd5h3f56gnsbdt479m0000gn/T/xfs-fefd6b15/dlx-8168/.pnp.js:19202:34)
    at Function.external_module_.Module._load (/private/var/folders/27/t3qhnmxd5h3f56gnsbdt479m0000gn/T/xfs-fefd6b15/dlx-8168/.pnp.js:19067:48)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/private/var/folders/27/t3qhnmxd5h3f56gnsbdt479m0000gn/T/xfs-fefd6b15/dlx-8168/.yarn/unplugged/blitz-npm-0.35.2-1772aafa05/node_modules/blitz/bin/blitz:2:15)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)

Paste all relevant code snippets here:

Nothing

What are detailed steps to reproduce this?

Run blitz -v and paste the output here:

0.35.2

Please include below any other applicable logs and screenshots that show your problem:

No response

flybayer commented 3 years ago

Thank you!! I'm fixing now