blitz-js / legacy-framework

MIT License
3 stars 2 forks source link

Error when running yarn install in fresh blitz project #361

Closed hmbrg closed 2 years ago

hmbrg commented 2 years ago

What is the problem?

When using yarn set version stable inside a newly create blitz project using blitz new name the following error occurs when running yarn install to initially install the dependencies.

Paste all your error logs here:

# This file contains the result of Yarn building a package (blitz@npm:0.44.4)
# Script name: postinstall

/Users/matthias/Code/blitz-yarn-test/.pnp.cjs:25007
    throw firstError;
    ^

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

Required package: find-up
Required by: blitz@npm:0.44.4 (via /Users/matthias/Code/blitz-yarn-test/.yarn/unplugged/blitz-npm-0.44.4-7a3f3e6a48/node_modules/blitz/scripts/)

Require stack:
- /Users/matthias/Code/blitz-yarn-test/.yarn/unplugged/blitz-npm-0.44.4-7a3f3e6a48/node_modules/blitz/scripts/postinstall.js
    at Function.external_module_.Module._resolveFilename (/Users/matthias/Code/blitz-yarn-test/.pnp.cjs:25006:55)
    at Function.external_module_.Module._load (/Users/matthias/Code/blitz-yarn-test/.pnp.cjs:24805:48)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/matthias/Code/blitz-yarn-test/.yarn/unplugged/blitz-npm-0.44.4-7a3f3e6a48/node_modules/blitz/scripts/postinstall.js:6:16)
    at Module._compile (node:internal/modules/cjs/loader:1097:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.external_module_.Module._load (/Users/matthias/Code/blitz-yarn-test/.pnp.cjs:24855:14)
    at Function.moduleExports.runMain (/Users/matthias/Code/blitz-yarn-test/.pnp.cjs:25056:31)

Node.js v17.2.0

Paste all relevant code snippets here:

yarn install 

What are detailed steps to reproduce this?

  1. run `blitz new name``
  2. cd name
  3. yarn set version stable
  4. yarn

Run blitz -v and paste the output here:

macOS Monterey | darwin-arm64 | Node: v17.2.0

blitz: 0.44.4 (global)
blitz: 1.0.0 (local)

  Package manager: yarn
  System:
    OS: macOS 12.0.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 96.27 MB / 16.00 GB
    Shell: 3.3.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 17.2.0 - /opt/homebrew/bin/node
    Yarn: 3.1.1 - /opt/homebrew/bin/yarn
    npm: 8.1.4 - /opt/homebrew/bin/npm
    Watchman: Not Found
  npmPackages:
    @prisma/client: Not Found
    blitz: Not Found
    prisma: Not Found
    react: Not Found
    react-dom: Not Found
    typescript: Not Found

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

No response

beerose commented 2 years ago

Hi! I couldn't reproduce it by following provided steps. Could you also try with Node v16?

beerose commented 2 years ago

Hi @hmbrg, did you solve the issue?

beerose commented 2 years ago

Closing due to inactivity.

solmon commented 1 year ago

@hmbrg , facing same issue, can you please share the solution, incase you have it?