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

Breaking in non-Windows machines after 1.0.0-pre.65 #226

Open
delucca opened this issue Oct 27, 2020 · 2 comments
Open

Breaking in non-Windows machines after 1.0.0-pre.65 #226

delucca opened this issue Oct 27, 2020 · 2 comments

Comments

@delucca
Copy link

delucca commented Oct 27, 2020

Hi!

I'm facing an issue with ts-node-dev and Yarn 2. Initially, I thought it was a Yarn 2 issue (also opened this issue at Yarn 2 repo), but it turns out that ts-node-dev is using Window paths after version 1.0.0-pre.65 and this is breaking on Linux machines.

More context (you can see the full context at Yarn 2 bug yarnpkg#2054:

Here is my package.json file:

{
  "name": "execution-mode",
  "version": "0.0.1",
  "description": "Web interface for Bud's execution mode",
  "main": "index.js",
  "scripts": {
    "start:dev": "run-s launch:server",
    "start:debug": "run-s launch:server --inspect",
    "launch:server": "ts-node-dev --project tsconfig.server.json src/index.ts",
    "build": "run-s clean compile copy",
    "compile": "tsc",
    "clean": "rimraf -rf dist",
    "copy": "cp README.md LICENSE package.json dist"
  },
  "author": "delucca <delucca@pm.me>",
  "license": "Apache-2.0",
  "private": true,
  "repository": {
    "type": "git",
    "url": "git+https://github.com/budproj/execution-mode.git"
  },
  "bugs": {
    "url": "https://github.com/budproj/execution-mode/issues"
  },
  "engines": {
    "yarn": ">=2.3.3",
    "node": ">=15.0.0"
  },
  "devDependencies": {
    "@tsconfig/recommended": "^1.0.1",
    "@types/eslint": "^7",
    "@types/eslint-config-prettier": "^6",
    "@types/eslint-plugin-prettier": "^3",
    "@types/koa": "^2.11.6",
    "@types/koa__router": "^8.0.3",
    "@types/node": "^14.14.3",
    "@types/prettier": "^2",
    "@types/react": "^16.9.53",
    "@types/rimraf": "^3",
    "@typescript-eslint/parser": "^4.6.0",
    "eslint": "^7.12.0",
    "eslint-config-prettier": "^6.14.0",
    "eslint-plugin-editorconfig": "^2.1.3",
    "eslint-plugin-prettier": "^3.1.4",
    "lint-staged": "^10.5.0",
    "npm-run-all": "^4.1.5",
    "prettier": "^2.1.2",
    "rimraf": "^3.0.2",
    "ts-node-dev": "^1.0.0"
  },
  "dependencies": {
    "@koa/router": "^9.4.0",
    "chalk": "^4.1.0",
    "koa": "^2.13.0",
    "next": "^9.4.4",
    "react": "^16.14.0",
    "typescript": "^4.0.3"
  }
}

Here is the output of yarn start:dev with Yarn 2.3.3:

execution-mode@budproj on  feature/initial-setup [✘!?] via ⬢ v15.0.0 took 16s
❯ yarn start:dev
/home/odelucca/Code/odelucca/execution-mode@budproj/.pnp.js:15815
    throw firstError;
    ^

Error: Qualified path resolution failed - none of the candidates can be found on the disk.

Source path: /home/odelucca/Code/odelucca/execution-mode@budproj/.yarn/$$virtual/ts-node-dev-virtual-eb89e14dc3/0/cache/ts-node-dev-npm-1.0.0-03ff9cc5a6-3e1064a042.zip/node_modules/ts-node-dev/lib\bin.js
Rejected candidate: /home/odelucca/Code/odelucca/execution-mode@budproj/.yarn/$$virtual/ts-node-dev-virtual-eb89e14dc3/0/cache/ts-node-dev-npm-1.0.0-03ff9cc5a6-3e1064a042.zip/node_modules/ts-node-dev/lib\bin.js
Rejected candidate: /home/odelucca/Code/odelucca/execution-mode@budproj/.yarn/$$virtual/ts-node-dev-virtual-eb89e14dc3/0/cache/ts-node-dev-npm-1.0.0-03ff9cc5a6-3e1064a042.zip/node_modules/ts-node-dev/lib\bin.js.js
Rejected candidate: /home/odelucca/Code/odelucca/execution-mode@budproj/.yarn/$$virtual/ts-node-dev-virtual-eb89e14dc3/0/cache/ts-node-dev-npm-1.0.0-03ff9cc5a6-3e1064a042.zip/node_modules/ts-node-dev/lib\bin.js.json
Rejected candidate: /home/odelucca/Code/odelucca/execution-mode@budproj/.yarn/$$virtual/ts-node-dev-virtual-eb89e14dc3/0/cache/ts-node-dev-npm-1.0.0-03ff9cc5a6-3e1064a042.zip/node_modules/ts-node-dev/lib\bin.js.node

    at internalTools_makeError (/home/odelucca/Code/odelucca/execution-mode@budproj/.pnp.js:15559:34)
    at resolveUnqualified (/home/odelucca/Code/odelucca/execution-mode@budproj/.pnp.js:16592:13)
    at resolveRequest (/home/odelucca/Code/odelucca/execution-mode@budproj/.pnp.js:16616:14)
    at Object.resolveRequest (/home/odelucca/Code/odelucca/execution-mode@budproj/.pnp.js:16688:26)
    at Function.external_module_.Module._resolveFilename (/home/odelucca/Code/odelucca/execution-mode@budproj/.pnp.js:15792:34)
    at Function.external_module_.Module._load (/home/odelucca/Code/odelucca/execution-mode@budproj/.pnp.js:15657:48)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:72:12)
    at node:internal/main/run_main_module:17:47
ERROR: "launch:server" exited with 1.
@merceyz
Copy link

merceyz commented Oct 27, 2020

Seems to be the same issues as in #224

@merceyz
Copy link

merceyz commented Dec 7, 2020

Yarn 2.4.0 makes sure to normalize those paths so upgrading Yarn should fix the issue

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