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

Using ts-node main branch as a dependency fails on Yarn berry #2002

Closed
4lph4-Ph4un opened this issue Apr 27, 2023 · 2 comments
Closed

Using ts-node main branch as a dependency fails on Yarn berry #2002

4lph4-Ph4un opened this issue Apr 27, 2023 · 2 comments

Comments

@4lph4-Ph4un
Copy link

4lph4-Ph4un commented Apr 27, 2023

Expected Behavior

Installing the patched version (for tsconfig.json with extended config array support) on main with Yarn Berry (v.3.5.0) should work:

yarn install

Actual Behavior

The above command causes the following errors:

Causes an error during prepack phase:

➤ YN0000: ┌ Resolution step
➤ YN0013: │ ts-node@https://github.com/TypeStrong/ts-node.git#commit=71dcfd7b813a4178d89562bb4c28d7d6579fae4f can't be found in the cache and will be fetched from GitHub
➤ YN0013: │ ts-node@https://github.com/TypeStrong/ts-node.git#commit=71dcfd7b813a4178d89562bb4c28d7d6579fae4f can't be found in the cache and will be fetched from the remote repository
➤ YN0058: │ ts-node@https://github.com/TypeStrong/ts-node.git#commit=71dcfd7b813a4178d89562bb4c28d7d6579fae4f: Packing the package failed (exit code 1, logs can be found here: C:\Users\Reaper\AppData\Local\Temp\xfs-3b2a30dd\pack.log)
➤ YN0000: └ Completed in 19s 92ms
➤ YN0000: Failed with errors in 19s 103ms

The mentioned log contains:

Packing ts-node@https://github.com/TypeStrong/ts-node.git#commit=71dcfd7b813a4178d89562bb4c28d7d6579fae4f from sources
Using Yarn for bootstrap. Reason: found {"packageManager":"yarn@3.4.1"} in manifest

�[31m�[1mInternal Error�[22m�[39m: @cspotcode/expect-stream@https://github.com/cspotcode/node-expect-stream.git#commit=4e425ff1eef240003af8716291e80fbaf3e3ae8f: Packing the package failed (exit code 1, logs can be found here: C:\Users\Reaper\AppData\Local\Temp\xfs-38ed450c\pack.log)
    at C:\Users\Reaper\AppData\Local\Temp\xfs-48ac0a0d\.yarn\releases\yarn-3.4.1.cjs:422:1665
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async $t.mktempPromise (C:\Users\Reaper\AppData\Local\Temp\xfs-48ac0a0d\.yarn\releases\yarn-3.4.1.cjs:314:69409)
    at async C:\Users\Reaper\AppData\Local\Temp\xfs-48ac0a0d\.yarn\releases\yarn-3.4.1.cjs:419:66
    at async $t.mktempPromise (C:\Users\Reaper\AppData\Local\Temp\xfs-48ac0a0d\.yarn\releases\yarn-3.4.1.cjs:314:69409)
    at async C:\Users\Reaper\AppData\Local\Temp\xfs-48ac0a0d\.yarn\releases\yarn-3.4.1.cjs:414:3118

Steps to reproduce the problem

  • Set Yarn to version berry via yarn set version berry
  • Set Yarn to use node-modules: yarn config set nodeLinker node-modules
  • Use the main branch of ts-node as dependencies.

Specifications

  • ts-node version: none.. patched branch on main!
  • node version: 19.5.0
  • TypeScript version: 5.4.0
  • tsconfig.json, if you're using one:
{
  "ts-node": {
    "esm": true,
    "compilerOptions": {
      "allowJs": false,
    },
    "files":         true,
    "transpileOnly": true
  },
  "compilerOptions": {
    "baseUrl": ".",
    "rootDir": "src",
    "target":  "ESNext",
    "module":  "NodeNext",

    "strict":                   true,
    "removeComments":           true,
    "preserveConstEnums":       true,
    "sourceMap":                true,
    "outDir":                   "build",
    "allowJs":                  true,
    "skipLibCheck":             true,
    "noUncheckedIndexedAccess": true,

    "esModuleInterop":                  true,
    "moduleResolution":                 "NodeNext",
    "forceConsistentCasingInFileNames": false,
    "resolveJsonModule":                true
  },
  "include": [
    "src/**/*"
  ],
  "exclude": [
    "node_modules"
  ],
  "watchOptions": {
    "watchFile":      "useFsEvents",
    "watchDirectory": "useFsEvents",
    "fallbackPolling": "dynamicPriority"
  }
}
  • package.json:
{
  "name": "@timsa/js-ts-test-bench",
  "author": "41ph4-Ph4un",
  "type": "module",
  "scripts": {
    "clean": "tsc -b --clean",
    "build": "yarn run clean && tsc -b",
    "lint": "eslint \"./**/*.{js,cjs,mjs,ts}\"",
    "lint:fix": "eslint --fix \"./**/*.{js,cjs,mjs,ts}\"",
    "start": "tsc -b -w",
    "start:ts-node": "ts-node",
    "execute": "node ./build/index.js"
  },
  "devDependencies": {
    "@types/node": "^18.16.2",
    "@typescript-eslint/eslint-plugin": "^5.59.1",
    "@typescript-eslint/parser": "^5.59.1",
    "eslint": "^8.39.0",
    "ts-node": "TypeStrong/ts-node#main",
    "typescript": "^5.0.4"
  },
  "packageManager": "yarn@3.5.0"
}
  • Operating system and version: Windows 10
@cspotcode
Copy link
Collaborator

cspotcode commented May 8, 2023

Should be fixed by #2017
E2Es here: https://github.com/TypeStrong/ts-node/actions/runs/4910996217

@4lph4-Ph4un
Copy link
Author

4lph4-Ph4un commented May 19, 2023

Aaaactually this still fails.
The packing fails with this error:

Packing ts-node@https://github.com/TypeStrong/ts-node.git#commit=7af5c48864b60576e471da03c064f325ce37d850 from sources
Using Yarn for bootstrap. Reason: found {"packageManager":"yarn@3.4.1"} in manifest

Internal Error: @cspotcode/expect-stream@https://github.com/cspotcode/node-expect-stream.git#commit=4e425ff1eef240003af8716291e80fbaf3e3ae8f: Packing the package failed (exit code 1, logs can be found here: C:\Users\Reaper\AppData\Local\Temp\xfs-b4457d8d\pack.log)
    at C:\Users\Reaper\AppData\Local\Temp\xfs-71116b64\.yarn\releases\yarn-3.4.1.cjs:422:1665
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async $t.mktempPromise (C:\Users\Reaper\AppData\Local\Temp\xfs-71116b64\.yarn\releases\yarn-3.4.1.cjs:314:69409)
    at async C:\Users\Reaper\AppData\Local\Temp\xfs-71116b64\.yarn\releases\yarn-3.4.1.cjs:419:66
    at async $t.mktempPromise (C:\Users\Reaper\AppData\Local\Temp\xfs-71116b64\.yarn\releases\yarn-3.4.1.cjs:314:69409)
    at async C:\Users\Reaper\AppData\Local\Temp\xfs-71116b64\.yarn\releases\yarn-3.4.1.cjs:414:3118

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

No branches or pull requests

2 participants