When I put -m
in a shebang line without a “test.js” value, that is, I’m referring to the current script beneath the shebang line the script exists.
In err.txt
we see js
is expecting a file name when -m
is in shebang line, which means we would have to create another file to point to aqnd just use a shell script with -m test.js
, instead of an -m
without pointing to a separate file meaning refer to the current script.
Error: can't open --enable-import-attributes: No such file or directory
In V8’s d8
Ecmascipt Modules are supported out of the box. In QuickJS -m
works on the shebang line out of the box, too
#!/usr/bin/env -S /home/user/bin/qjs -m --std
// QuickJS Native Messaging host
// guest271314, 5-6-2022
import {webserver} from './webserver.so';