Repository navigation
Missing ./tools/node_modules/eslint/eslint.js on make test? #39709
Copy link
Copy link
Closed
Labels
buildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.testIssues and PRs related to Node.js core tests and test infrastructure.Issues and PRs related to Node.js core tests and test infrastructure.
Description
Version
14.17.4 and 16.6.1
Platform
Linux alpental 5.10.0-0.bpo.5-amd64 #1 SMP Debian 5.10.24-1~bpo10+1 (2021-03-29) x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
Hello, I was trying to upgrade my local devenv to Node 16.6.1 and typically compile / test / install from sources tar.gz as follows below. Everything seems fine. But, the make ultimately fails due to a missing eslint.js module?
I do not appear blocked by this; I can continue on to install the version I have built w/out problem. However, I am not exactly sure what I have left unfinished in the build.
Any insight into this would be appreciated.
$ cd ~/devenv
$ wget https://nodejs.org/dist/v16.6.1/node-v16.6.1.tar.gz
$ tar -xvf node-v16.6.1.tar.gz
$ cd node-v16.6.1
$ apt-get update
$ apt-get upgrade
$ ./configure
Node.js configure: Found Python 3.7.2...
INFO: configure completed successfully
$ make -j16 test
.
.
.
----------------------------------------------------------------------
Ran 6 tests in 0.001s
OK
make -s test-doc
Running JS linter...
Running Markdown linter...
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module '/home/cdr/devenv/node-v16.6.1/tools/node_modules/eslint/bin/eslint.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
make[1]: *** [Makefile:1266: lint-js-doc] Error 1
make[1]: *** Waiting for unfinished jobs....
added 105 packages, and audited 106 packages in 2s
82 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
make: *** [Makefile:299: test] Error 2
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
make test completes w/out error (at least not due what seems like a missing dependency).
What do you see instead?
build break due to seeming missing eslint.js dependency
Additional information
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
buildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.testIssues and PRs related to Node.js core tests and test infrastructure.Issues and PRs related to Node.js core tests and test infrastructure.
Activity
Trott commentedon Aug 8, 2021
@nodejs/releasers @nodejs/build Possible issue in the tar.gz source file generation? Or intentional decision?
@ChrisRus Quick fix might be to run these three commands:
mkdir tools/node_modulestools/update-eslint.shecho "process.exit(0);" > .eslintrc.jsThis will bypass (rather than run) ESLint.
richardlau commentedon Aug 8, 2021
I don't know why (to save space?) but it is intentional -- we remove a lot of things for the source tarball, including everything under
tools/node_modulesand the.eslintfiles:node/Makefile
Lines 1064 to 1100 in 6145113
The
linttargets have escape paths for the source tarball -- maybe we need to do the same elsewhere:node/Makefile
Lines 1424 to 1428 in 6145113
targos commentedon Aug 9, 2021
I think
make test-onlyis supposed to work with the source tarball.targos commentedon Aug 9, 2021
Similar issues: #34005 #32765
ChrisRus commentedon Aug 9, 2021
Thank you for the replies. I will try
$ make test-only$ make installand used it. Seemed okay except for the CLI:$ make test, hit the error above, and then go ahead and$ make installthen I am seeing that the installed Node.js version will not autocomplete on when using the interactive CLI (e.g. for adhoc testing)$ make clean && make && make installthen I see no issue w/auto-complete in the CLI (14.17.4 + 16.6.1).Trott commentedon Aug 9, 2021
It should probably be added to
BUILDING.md. A short section on building from source tar might be a good addition. I'm willing to do it myself, but I'd rather have someone who, you know, actually builds from the source tar write it up.ChrisRus commentedon Aug 9, 2021
Not having any luck getting
$ make test-onlyto exit cleanly either:Lots of
ERR_SSL_EE_KEY_TOO_SMALLerrors. And, ultimately the following error that stops the build:richardlau commentedon Aug 9, 2021
You're probably running into #27862.
ChrisRus commentedon Aug 9, 2021
The
BUILDING.mddocument says use$ make test-onlyto "verify the build". And, then goes on to talk about$ make test"does a full check on the codebase, including running linters and documentation tests".So, perhaps this guidance is okay? And, that in the case of
$ make testthere's some loose end wrt eslist? And, for$ make test-onlythe issue currently is as @richardlau helpfully points out?