yarnpkg / berry

📦🐈 Active development trunk for Yarn ⚒
https://yarnpkg.com
BSD 2-Clause "Simplified" License
7.41k stars 1.11k forks source link

[Bug] typescript? crash when adding a dependency #1966

Open xenoterracide opened 4 years ago

xenoterracide commented 4 years ago

this might? be an actually problem with typescript?

[12:50:55 PM] File change detected. Starting incremental compilation...

internal/fs/utils.js:269
    throw err;
    ^

Error: ENOENT: no such file or directory, stat '/Users/calebcushing/IdeaProjects/briggo/services/.yarn/cache/@js-joda-core-npm-3.1.0-cede2df196-968ccccdd6.zip'
    at Object.statSync (fs.js:1016:3)
    at NodeFS.statSync (/Users/calebcushing/IdeaProjects/briggo/services/.pnp.js:21423:24)
    at getZipOptions (/Users/calebcushing/IdeaProjects/briggo/services/.pnp.js:24537:26)
    at ZipOpenFS.getZipSync (/Users/calebcushing/IdeaProjects/briggo/services/.pnp.js:24545:31)
    at ZipOpenFS.makeCallSync (/Users/calebcushing/IdeaProjects/briggo/services/.pnp.js:24412:17)
    at ZipOpenFS.unwatchFile (/Users/calebcushing/IdeaProjects/briggo/services/.pnp.js:24386:17)
    at VirtualFS.unwatchFile (/Users/calebcushing/IdeaProjects/briggo/services/.pnp.js:21943:24)
    at PosixFS.unwatchFile (/Users/calebcushing/IdeaProjects/briggo/services/.pnp.js:21943:24)
    at Object.close (/Users/calebcushing/IdeaProjects/briggo/services/.yarn/cache/typescript-patch-1c53dc8ca0-72db87d09f.zip/node_modules/typescript/lib/tsc.js:3662:53)
    at Object.closeFileWatcherOf (/Users/calebcushing/IdeaProjects/briggo/services/.yarn/cache/typescript-patch-1c53dc8ca0-72db87d09f.zip/node_modules/typescript/lib/tsc.js:83584:32) {
  errno: -2,
  syscall: 'stat',
  code: 'ENOENT',
  path: '/Users/calebcushing/IdeaProjects/briggo/services/.yarn/cache/@js-joda-core-npm-3.1.0-cede2df196-968ccccdd6.zip'
}
The terminal process "/bin/zsh '-c', 'yarn :g:tsc --project app-lib --watch'" terminated with exit code: 1.
> yarn workspace @bb/test-apollo-configuration add @js-joda/core
➤ YN0000: ┌ Resolution step
➤ YN0002: │ eslint-plugin-unused-imports@npm:0.1.3 doesn't provide @typescript-eslint/parser@^2.0.0 requested by @typescript-eslint/eslint-plugin@npm:2.34.0
➤ YN0002: │ jest-mock-extended@npm:1.0.10 [5af4f] doesn't provide typescript@>=3.7.0 requested by ts-essentials@npm:4.0.0
➤ YN0002: │ @firebase/database@npm:0.6.11 doesn't provide @firebase/app-types@0.x requested by @firebase/auth-interop-types@npm:0.1.5
➤ YN0060: │ @graphql-tools/relay-operation-optimizer@npm:6.2.0 [0e87d] provides graphql@npm:14.7.0 with version 14.7.0 which doesn't satisfy ^15.0.0 requested by relay-compiler@npm:10.0.1
➤ YN0060: │ @graphql-tools/relay-operation-optimizer@npm:6.2.4 [db361] provides graphql@npm:14.7.0 with version 14.7.0 which doesn't satisfy ^15.0.0 requested by relay-compiler@npm:10.0.1
➤ YN0002: │ jest-mock-extended@npm:1.0.10 [1a13b] doesn't provide typescript@>=3.7.0 requested by ts-essentials@npm:4.0.0
➤ YN0000: └ Completed in 0s 681ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ @js-joda/core@npm:3.2.0 can't be found in the cache and
➤ YN0000: └ Completed in 4s 644ms
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed in 8s 51ms
➤ YN0000: Done with warnings in 13s 869ms
> yarn up @js-joda/core  # services -> feature/RS2-1243-logging $ !
➤ YN0000: ┌ Resolution step
➤ YN0002: │ eslint-plugin-unused-imports@npm:0.1.3 doesn't provide @typescript-eslint/parser@^2.0.0 requested by @typescript-eslint/eslint-plugin@npm:2.34.0
➤ YN0002: │ jest-mock-extended@npm:1.0.10 [5af4f] doesn't provide typescript@>=3.7.0 requested by ts-essentials@npm:4.0.0
➤ YN0002: │ @firebase/database@npm:0.6.11 doesn't provide @firebase/app-types@0.x requested by @firebase/auth-interop-types@npm:0.1.5
➤ YN0060: │ @graphql-tools/relay-operation-optimizer@npm:6.2.0 [0e87d] provides graphql@npm:14.7.0 with version 14.7.0 which doesn't satisfy ^15.0.0 requested by relay-compiler@npm:10.0.1
➤ YN0060: │ @graphql-tools/relay-operation-optimizer@npm:6.2.4 [db361] provides graphql@npm:14.7.0 with version 14.7.0 which doesn't satisfy ^15.0.0 requested by relay-compiler@npm:10.0.1
➤ YN0002: │ jest-mock-extended@npm:1.0.10 [1a13b] doesn't provide typescript@>=3.7.0 requested by ts-essentials@npm:4.0.0
➤ YN0000: └ Completed in 0s 647ms
➤ YN0000: ┌ Fetch step
➤ YN0019: │ @js-joda-core-npm-3.1.0-cede2df196-968ccccdd6.zip appea
➤ YN0000: └ Completed in 3s 466ms
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed in 5s 949ms
➤ YN0000: Done with warnings in 10s 869ms
> yarn --version    # services -> feature/RS2-1243-logging $ ! RC=1
2.3.0
> yarn :g:tsc --version  # services -> feature/RS2-1243-logging $ !
Version 4.0.3
> node --version         # services -> feature/RS2-1243-logging $ !
v12.18.3

I was running this from a vscode task

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "yarn :g:tsc --watch",
      "type": "shell",
      "command": "yarn :g:tsc --project app-lib --watch",
      "problemMatcher": ["$tsc-watch"],
      "group": {
        "kind": "build",
        "isDefault": true
      },
      "presentation": {
        "revealProblems": "onProblem",
        "reveal": "always",
        "panel": "dedicated"
      },
      "runOptions": {
        "runOn": "folderOpen",
        "instanceLimit": 1,
        "reevaluateOnRerun": true
      }
    }
  ]
}
andreialecu commented 4 years ago

Did the yarn up command remove the zip perhaps? The log shows a "appears to be" log line that is cut early. Was it snipped accidentally?

Try reinstalling the dependency.

xenoterracide commented 4 years ago

yeah, it would have removed version 3.1.0, upgrading replacing with 3.2.0

yarnbot commented 3 years ago

Hi! 👋

This issue looks stale, and doesn't feature the reproducible label - which implies that you didn't provide a working reproduction using Sherlock. As a result, it'll be closed in a few days unless a maintainer explicitly vouches for it or you edit your first post to include a formal reproduction (you can use the playground for that).

Note that we require Sherlock reproductions for long-lived issues (rather than standalone git repositories or similar) because we're a small team. Sherlock gives us the ability to check which bugs are still affecting the master branch at any given point, and decreases the amount of code we need to run on our own machines (thus leading to faster bug resolutions). It helps us help you! 😃

If you absolutely cannot reproduce a bug on Sherlock (for example because it's a Windows-only issue), a maintainer will have to manually add the upholded label. Thanks for helping us triaging our repository! 🌟

xenoterracide commented 3 years ago

I mean, all that has to be done to repro this is run a yarn tsc --watch and then, in another terminal yarn remove -A somedep or yarn up somedep where somedep can actually be upgraded (it's not on the latest)