-
Notifications
You must be signed in to change notification settings - Fork 30k
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
make lint-js
throws error
#41771
Comments
If you haven't compiled Node.js locally, To fix the issue, you can either build Node.js locally (no need to install it--just having it built in the your project directory will be enough) or update your system Node.js to 12.x or newer. |
@MrJithil OK, that's surprising. What happens if you run |
In particular, since you have the 18.0.0-pre compiled, do all three of these work? $ tools/node_modules/eslint/bin/eslint.js
$ node tools/node_modules/eslint/bin/eslint.js
$ ./node tools/node_modules/eslint/bin/eslint.js
$ |
Hmm, that's odd since it takes node from the environment so if It might be a WSL related issue? (though why would it?) there is probably something else at play based on the environment. |
Seems like the problem is happening in Does |
The way
If that fails, at least we have a narrow area to find the cause of the problem. If that succeeds, the search continues.... |
Got this error |
OK, instead of using |
Sorry. I ran the previous command in the wrong shell. Now, I corrected it and ran Waiting for the results. Seems like its taking time. |
And below is the output @Trott |
Are you sure you removed |
Hello @Trott, Finally discovered the issue. wsl instance unable to resolve the Also, as you suggested All good now. Thank you again @Trott for your kind support and a lot of effort to fix this case. |
Glad you got it worked out! |
I have the same issue on Windows (outside WSL): PS C:\Users\x\workspace\nodejs\node> node -v
v16.13.0
PS C:\Users\x\workspace\nodejs\node> node tools/node_modules/eslint/bin/eslint.js .eslintrc.js benchmark doc lib test tools
Oops! Something went wrong! :(
ESLint: 8.9.0
C:\Users\x\workspace\nodejs\node\tools\node_modules\eslint\node_modules\eslint:1
(function (exports, require, module, __filename, __dirname) { ..
^
SyntaxError: Unexpected token '.'
at new Script (node:vm:100:7)
at NativeCompileCache._moduleCompile (C:\Users\x\workspace\nodejs\node\tools\node_modules\eslint\node_modules\v8-compile-cache\v8-compile-cache.js:240:18)
at Module._compile (C:\Users\x\workspace\nodejs\node\tools\node_modules\eslint\node_modules\v8-compile-cache\v8-compile-cache.js:184:36)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (C:\Users\x\workspace\nodejs\node\tools\node_modules\eslint\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
at Object.<anonymous> (C:\Users\x\workspace\nodejs\node\tools\node_modules\eslint\node_modules\eslint-plugin-jsdoc\dist\rules\checkExamples.js:8:15)
at Module._compile (C:\Users\x\workspace\nodejs\node\tools\node_modules\eslint\node_modules\v8-compile-cache\v8-compile-cache.js:192:30) |
Version
v18.0.0-pre
Platform
Linux 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
tools
What steps will reproduce the bug?
run
make lint-js
and observe the errors in WSL Ubuntu. I have tried the latest source on macOS and faced the same.How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
Linters should run successfully.
What do you see instead?
Errors and linting broken
Additional information
No response
The text was updated successfully, but these errors were encountered: