Repository navigation
Problem with make jslint and thus make test #49130
Description
Activity
There is a lint error in your code from #49025 e.g. stuff like https://github.com/nodejs/node/pull/49025/files#diff-ac5af2e03d6e50747ae181d62ebb939ee884b05c70c42aa7297fb7323b3e6639R950 is missing a semicolon
Thanks!
Ok, this is how a typical lint error looks with the setup. I was expecting, that it would tell me at least in which file the problem is, since my idea was to use the make test to help me find the lint errors.Run
make lint?This gives the same error message:
root@0faf93d966d2:/workspaces/node# make lint
Running JS linter...Oops! Something went wrong! :(
ESLint: 8.46.0
/workspaces/node/tools/node_modules/eslint/node_modules/eslint:1
..
^SyntaxError: Unexpected token '.'
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1153:20)
at Module._compile (node:internal/modules/cjs/loader:1205:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Module.require (node:internal/modules/cjs/loader:1115:19)
at require (node:internal/modules/helpers:130:18)
at Object. (/workspaces/node/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkExamples.js:8:15)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
make[1]: *** [Makefile:1364: lint-js] Error 2- changed the title
[-]Problem with make test[/-][+]Problem with make jslint and thus make test[/+]on Aug 13, 2023 @martenrichter did you run
makebefore runningmake test? If you didn't make Node will use the system version which may often be incompatible with the code syntax wise.I recall Rich posted about it in some old issue
Edit: found it #41771 (comment)
That old issue looks promising, I will test this soon.
I can not remember if I ranmakethe last time when I have runmake test.
But anyway, the thread will probably have the answer! Thanks!Happy to help I'm going to go ahead and close this issue. If anyone feels differently feel free to reopen.
So thanks to the pointers, I was able to hunt down the cause of the issue. Or let's say I know how to workaround it.
The problem occurs in:
node/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkExamples.js
Line 8 in d396a04
var _eslint = require("eslint");
I have seen, that this line was changed 5 days ago, I will therefore resync my patch with current master and see if it is fixed.Ok, also the new version fails at this line:
node/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkExamples.js
Line 8 in 41a3a1d
var _eslint = _interopRequireWildcard(require("eslint"));
loading eslint from within its plugin fails in my example. I will now workaround this problem by replacing this one test with another working test.
Please tell me, if this should be investigated more in detail?Please tell me, if this should be investigated more in detail?
No you probably just need to rebuiild, but thanks for offering :)
Version
current master
Platform
Linux 0faf93d966d2 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
test linter
What steps will reproduce the bug?
I have set up a dev container with nodejs/devcontainer:nightly .
The git is bound form a windows file system into the container.
When I configure with ninja and run make test, I get:
I have made minor modification to js and binary side, but I do not think it is related (#49025).
I know wanted to test changes in the tests to cover the changes and ran into this issue.
I am sorry if it is something stupid, what I forget when setting it up, but I thought using the dev container in VS code should be safe. Thanks!
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
That it passes or stop at a meaning full error.
What do you see instead?
See above
Additional information
No response