1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
Description: use system shared NodeJS modules
Also, use native wasm2c.
See also <https://github.com/emscripten-core/emscripten/issues/12688>
Author: Jonas Smedegaard <dr@jones.dk>
Last-Update: 2021-11-19
---
test/test_sockets.py | 4 ----
tools/shared.py | 6 +++---
2 files changed, 3 insertions(+), 7 deletions(-)
--- a/test/test_sockets.py
+++ b/test/test_sockets.py
@@ -163,10 +163,6 @@
print('Running the socket tests. Make sure the browser allows popups from localhost.')
print()
- # Use emscripten root for node module lookup. This is needed because the unit tests each
- # run with CWD set to a temporary directory outside the emscripten tree.
- print('Setting NODE_PATH=' + path_from_root('node_modules'))
- os.environ['NODE_PATH'] = path_from_root('node_modules')
# Note: in the WebsockifyServerHarness and CompiledServerHarness tests below, explicitly use
# consecutive server listen ports, because server teardown might not occur deterministically
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -264,11 +264,11 @@
def get_npm_cmd(name):
if WINDOWS:
- cmd = [path_from_root('node_modules/.bin', name + '.cmd')]
+ cmd = name + '.cmd'
else:
- cmd = config.NODE_JS + [path_from_root('node_modules/.bin', name)]
+ cmd = name
if not os.path.exists(cmd[-1]):
- exit_with_error(f'{name} was not found! Please run "npm install" in Emscripten root directory to set up npm dependencies')
+ exit_with_error(f'{name} was not found! Please report this as a bug against emscripten - more info at https://www.debian.org/Bugs/Reporting')
return cmd
|