Repository navigation
Missing ./tools/node_modules/eslint/eslint.js on make test? #39709
Description
Activity
@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_modules
tools/update-eslint.sh
echo "process.exit(0);" > .eslintrc.jsThis will bypass (rather than run) ESLint.
Reacted by Chris RussellI 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:Lines 1064 to 1100 in 6145113
$(TARBALL): release-only doc-only git checkout-index -a -f --prefix=$(TARNAME)/ mkdir -p $(TARNAME)/doc/api cp doc/node.1 $(TARNAME)/doc/node.1 cp -r out/doc/api/* $(TARNAME)/doc/api/ $(RM) -r $(TARNAME)/.editorconfig $(RM) -r $(TARNAME)/.git* $(RM) -r $(TARNAME)/.mailmap $(RM) -r $(TARNAME)/deps/openssl/openssl/demos $(RM) -r $(TARNAME)/deps/openssl/openssl/doc $(RM) -r $(TARNAME)/deps/openssl/openssl/test $(RM) -r $(TARNAME)/deps/uv/docs $(RM) -r $(TARNAME)/deps/uv/samples $(RM) -r $(TARNAME)/deps/uv/test $(RM) -r $(TARNAME)/deps/v8/samples $(RM) -r $(TARNAME)/deps/v8/tools/profviz $(RM) -r $(TARNAME)/deps/v8/tools/run-tests.py $(RM) -r $(TARNAME)/doc/images # too big $(RM) -r $(TARNAME)/test*.tap $(RM) -r $(TARNAME)/tools/cpplint.py $(RM) -r $(TARNAME)/tools/eslint-rules $(RM) -r $(TARNAME)/tools/license-builder.sh $(RM) -r $(TARNAME)/tools/node_modules $(RM) -r $(TARNAME)/tools/osx-* $(RM) -r $(TARNAME)/tools/osx-pkg.pmdoc find $(TARNAME)/deps/v8/test/* -type d ! -regex '.*/test/torque$$' | xargs $(RM) -r find $(TARNAME)/deps/v8/test -type f ! -regex '.*/test/torque/.*' | xargs $(RM) find $(TARNAME)/deps/zlib/contrib/* -type d ! -regex '.*/contrib/optimizations$$' | xargs $(RM) -r find $(TARNAME)/ -name ".eslint*" -maxdepth 2 | xargs $(RM) find $(TARNAME)/ -type l | xargs $(RM) tar -cf $(TARNAME).tar $(TARNAME) $(RM) -r $(TARNAME) gzip -c -f -9 $(TARNAME).tar > $(TARNAME).tar.gz ifeq ($(XZ), 1) xz -c -f -$(XZ_COMPRESSION) $(TARNAME).tar > $(TARNAME).tar.xz endif $(RM) $(TARNAME).tar The
linttargets have escape paths for the source tarball -- maybe we need to do the same elsewhere:Lines 1424 to 1428 in 6145113
else lint lint-ci: $(info Linting is not available through the source tarball.) $(info Use the git repo instead: $$ git clone https://github.com/nodejs/node.git) endif I think
make test-onlyis supposed to work with the source tarball.Reacted by Chris Russell, jonathanforhan and dmwit-rapidfort- addedbuildIssues 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.
on Aug 9, 2021 Thank you for the replies. I will try
$ make test-only- I first noticed this when compiling / testing / installing v14.17.4 IIRC.
- Up until then (for years) have used the basic script from OP w/out error.
- Could be that I need to re-read the README for latest build/testing instruction? I admit I have not checked...
- Thinking back, when I 1st encountered w/v14.17.4 but was rushed so executed
$ make installand used it. Seemed okay except for the CLI:- Empirically, if you
$ 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) - This seems odd - I presume that the build process has to prepare / register assets to affect auto-complete. But, it's surprising to me that the make targets would not have already been evaluated prior to evaluation of any Makefile test target(s)?
- If I
$ make clean && make && make installthen I see no issue w/auto-complete in the CLI (14.17.4 + 16.6.1).
- Empirically, if you
- Could be that I need to re-read the README for latest build/testing instruction? I admit I have not checked...
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.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:WAIT-ACCEPT error setting certificate 139670488794944:error:0909006C:PEM routines:get_name:no start line:../deps/openssl/openssl/crypto/pem/pem_lib.c:745:Expecting: DH PARAMETERS 139670488794944:error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small:../deps/openssl/openssl/ssl/ssl_rsa.c:301: (node:6833) [DEP0064] DeprecationWarning: tls.createSecurePair() is deprecated. Please use tls.TLSSocket instead. (Use `node --trace-deprecation ...` to show where the warning was created) node:assert:123 throw new AssertionError(obj); ^ AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: 1 !== 0 at process.<anonymous> (/home/cdr/devenv/node-v16.6.1/test/sequential/test-tls-securepair-client.js:178:12) at process.emit (node:events:406:35) { generatedMessage: true, code: 'ERR_ASSERTION', actual: 1, expected: 0, operator: 'strictEqual' } Command: out/Release/node /home/cdr/devenv/node-v16.6.1/test/sequential/test-tls-securepair-client.js [02:07|% 100|+ 3227|- 169]: Done make[1]: *** [Makefile:278: jstest] Error 1 make: *** [Makefile:312: test-only] Error 2 root@alpental:/home/cdr/devenv/node-v16.6.1#You're probably running into #27862.
Reacted by Chris RussellIt 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.
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?
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.jsmodule?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.
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!