Closed ohpyupi closed 5 years ago
+1 same to me
If I am not mistaken, the hashbang isn't even required in NPM-based CLI apps, as they are wrapped by a script, which forwards arguments. Here is an example:
Ingwie@Ingwies-Macbook-Pro.local ~ $ file /usr/local/bin/babel
/usr/local/bin/babel: a /usr/bin/env node script text executable, ASCII text
Ingwie@Ingwies-Macbook-Pro.local ~ $ head -n 5 /usr/local/bin/babel
#!/usr/bin/env node
require("../lib/babel");
The corresponding file:
Now, this is on a Mac. On windows, this should be wrapped. So the best bet is to take the Babel aproach and just create a script that really just requires the actual library itself - so the hashbang does not get in the way.
Hey guys,
Below is the error message I got when I attempt to build webpack bundle file with Rainbow.
Unexpected character '#' (1:0)
`!/usr/bin/env node
I don't really see the reason why the hashbang command line should be there. So I tried it removing the line. However, I got another warning message.
WARNING in ./~/bindings/bindings.js
76:22-40 Critical dependency: the request of a dependency is an expression
Is there anybody who solved the problem? Thanks.