-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
I can't run the tests, perhaps a Windows issue? #2760
Comments
That seems to be coming from inside of babel. What does |
It has
|
Update: |
ah yes, that's indeed because it's a unix-style symlink. I suspect that if you replace the symlink with a copy of the file it's targeting, that it should work? |
These Windows CI errors may be related: https://ci.appveyor.com/project/ljharb/eslint-plugin-import/builds/46821162/job/gort0xlqll93sbix
|
I can’t reproduce those errors in my local Windows, so I’m not sure if they are related. |
This is an |
That's not an option, unfortunately, because nyc 15 drops node versions we support. |
I'm also experiencing this issue, on Windows 11 Home version 22H2 (build 22621.2715). |
Apparently that's not acceptable per #3008 (review)
Edit: answered here:
|
The earliest nyc version that avoids these problems on windows isn't compatible with this project. |
eslint-plugin-import/.github/workflows/native-wsl.yml Lines 90 to 92 in a3a7176
Maybe the version requirement should instead be changed from |
Unfortunately that would install nyc latest, on versions of node that can't support it. |
I would think that it would make an otherwise consistent dependency tree. I was trying to update that Installing with node 4 + npm 2: $ npm install
...
npm ERR! Darwin 23.5.0
npm ERR! argv "/Users/dan/.proto/tools/node/4.9.1/bin/node" "/Users/dan/.proto/tools/npm/2.15.12/bin/npm-cli.js" "install"
npm ERR! node v4.9.1
npm ERR! npm v2.15.12
npm ERR! path /Users/dan/Source/eslint-plugin-import/node_modules/eslint-doc-generator/node_modules/@typescript-eslint/utils/node_modules/@types/json-schema/package.json
npm ERR! code ENOTDIR
npm ERR! errno -20
npm ERR! syscall open
npm ERR! ENOTDIR: not a directory, open '/Users/dan/Source/eslint-plugin-import/node_modules/eslint-doc-generator/node_modules/@typescript-eslint/utils/node_modules/@types/json-schema/package.json'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /Users/dan/Source/eslint-plugin-import/npm-debug.log In node 8 + npm 5, I got a built-time error about python version (understandable). And then at test time: $ npm test
...
> eslint-plugin-import@2.29.1 mocha /Users/dan/Source/eslint-plugin-import
> cross-env BABEL_ENV=test nyc mocha "tests/src"
/Users/dan/Source/eslint-plugin-import/node_modules/eslint/lib/cli-engine/cli-engine.js:456
} catch {
^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
...
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! eslint-plugin-import@2.29.1 mocha: `cross-env BABEL_ENV=test nyc mocha "tests/src"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the eslint-plugin-import@2.29.1 mocha script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/dan/.npm/_logs/2024-05-21T02_49_11_875Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! eslint-plugin-import@2.29.1 tests-only: `npm run mocha tests/src`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the eslint-plugin-import@2.29.1 tests-only script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/dan/.npm/_logs/2024-05-21T02_49_11_917Z-debug.log
npm ERR! Test failed. See above for more details. I think the incidental complexity of supporting versions this old may outweigh the usefulness! |
The usefulness is near infinite, and supporting node devs who use windows is unfortunately a very very very obscure edge case. At the moment, you need to manually run the commands that CI is running. I'm happy to make this easier - ideally it's a single |
I'm sure I'm missing some perspective, not having been involved with Node during many years of growing pains. Still my understanding is that users of older versions are still free to use old versions. If you're stuck on eslint 2, you're unlikely to install At any rate, in CI on these old versions, there are things that crash out, like https://github.com/import-js/eslint-plugin-import/actions/runs/9107211528/job/25035728071#step:3:104 And lots of warnings that I can't tell if they should be failing the tests or are just diagnostic output that is expected but not captured by the testing rig: https://github.com/import-js/eslint-plugin-import/actions/runs/9107211528/job/25035728071#step:5:53
Anyway, when I run $ export ESLINT_VERSION=6 && npm run copy-metafiles && ./tests/dep-time-travel.sh && npm run tests-only
...
1) TypeScript export valid
export * from './module';
:
AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ { ruleId: 'export',
severity: 1,
message: 'No named exports found in module \'./module\'.',
line: 2,
column: 27,
nodeType: 'Literal',
endLine: 2,
endColumn: 37 } ]
+ expected - actual
-1
+0
at testValidTemplate (node_modules/eslint/lib/rule-tester/rule-tester.js:460:20)
at Context.RuleTester.it (node_modules/eslint/lib/rule-tester/rule-tester.js:662:25)
2) Typescript no-restricted-paths invalid import type b from "../server/b":
AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: []
+ expected - actual
-0
+1
at testInvalidTemplate (node_modules/eslint/lib/rule-tester/rule-tester.js:507:24)
at Context.RuleTester.it (node_modules/eslint/lib/rule-tester/rule-tester.js:670:25)
3) Typescript no-restricted-paths invalid import type b from "../server/b":
AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: []
+ expected - actual
-0
+1
at testInvalidTemplate (node_modules/eslint/lib/rule-tester/rule-tester.js:507:24)
at Context.RuleTester.it (node_modules/eslint/lib/rule-tester/rule-tester.js:670:25)
4) Typescript no-restricted-paths invalid import type a from "../client/a"
import type c from "./c.ts":
AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ { ruleId: 'no-restricted-paths',
severity: 1,
message: 'Unexpected path "./c.ts" imported in restricted zone.',
line: 2,
column: 20,
nodeType: 'Literal',
endLine: 2,
endColumn: 28 } ]
+ expected - actual
-1
+2
at testInvalidTemplate (node_modules/eslint/lib/rule-tester/rule-tester.js:507:24)
at Context.RuleTester.it (node_modules/eslint/lib/rule-tester/rule-tester.js:670:25)
5) Typescript no-restricted-paths invalid import type b from "../server/b":
AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: []
+ expected - actual
-0
+1
at testInvalidTemplate (node_modules/eslint/lib/rule-tester/rule-tester.js:507:24)
at Context.RuleTester.it (node_modules/eslint/lib/rule-tester/rule-tester.js:670:25)
6) Typescript no-restricted-paths invalid import type b from "../two/a":
AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: []
+ expected - actual
-0
+1
at testInvalidTemplate (node_modules/eslint/lib/rule-tester/rule-tester.js:507:24)
at Context.RuleTester.it (node_modules/eslint/lib/rule-tester/rule-tester.js:670:25)
7) Typescript no-restricted-paths invalid import type b from "../two/a":
AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: []
+ expected - actual
-0
+1
at testInvalidTemplate (node_modules/eslint/lib/rule-tester/rule-tester.js:507:24)
at Context.RuleTester.it (node_modules/eslint/lib/rule-tester/rule-tester.js:670:25)
8) Typescript no-restricted-paths invalid import type b from "../two/a":
AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: []
+ expected - actual
-0
+1
at testInvalidTemplate (node_modules/eslint/lib/rule-tester/rule-tester.js:507:24)
at Context.RuleTester.it (node_modules/eslint/lib/rule-tester/rule-tester.js:670:25)
9) Typescript no-restricted-paths invalid import type A from "../two/a":
AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: []
+ expected - actual
-0
+1
at testInvalidTemplate (node_modules/eslint/lib/rule-tester/rule-tester.js:507:24)
at Context.RuleTester.it (node_modules/eslint/lib/rule-tester/rule-tester.js:670:25)
10) Typescript no-restricted-paths invalid import type A from "../two/a":
AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: []
+ expected - actual
-0
+1
at testInvalidTemplate (node_modules/eslint/lib/rule-tester/rule-tester.js:507:24)
at Context.RuleTester.it (node_modules/eslint/lib/rule-tester/rule-tester.js:670:25) |
In practice, having a major bump means that bugfixes and security fixes don't get backported, so "they can just stay on an old version" is a pipe dream. I would love to improve the test and dev experience on Windows, so if you can come up with a PR that doesn't affect runtime I'd be very excited to review it. |
Agreed. OTOH, I can't imagine a user who is unhappy that they can't get fixes in
I'll be happy to give it a shot. |
I just cloned the repository and these commands.
Specs:
windows 11
node 18.11.0
npm 9.4.0
The text was updated successfully, but these errors were encountered: