You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But when I transformed it to UTF-8 with BOM it does not run.
line 1: ���#!/bin/node: No such file or directory
Seeing this I just realized that it is a problem of the terminal and not of Node, but if I run it with Node, the problem is still.
node script.js
Answer in LxTerminal:
���#!/bin/node
Answer on Sakura:
#!/bin/node
^
SyntaxError: Invalid or unexpected token
at Object.compileFunction (node:vm:353:18)
at wrapSafe (node:internal/modules/cjs/loader:1039:15)
at Module._compile (node:internal/modules/cjs/loader:1073:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
at Module.load (node:internal/modules/cjs/loader:989:32)
at Function.Module._load (node:internal/modules/cjs/loader:829:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
at node:internal/main/run_main_module:17:47
The text was updated successfully, but these errors were encountered:
arteze
changed the title
Run Script from the console with UTF-8 with BOM
Run script from the console with UTF-8 with BOM
Jun 22, 2021
From Linux I make a script with shebang:
#!/bin/node // Code...
But when I transformed it to UTF-8 with BOM it does not run.
line 1: ���#!/bin/node: No such file or directory
Seeing this I just realized that it is a problem of the terminal and not of Node, but if I run it with Node, the problem is still.
Answer in LxTerminal:
���#!/bin/node
Answer on Sakura:
#!/bin/node ^ SyntaxError: Invalid or unexpected token at Object.compileFunction (node:vm:353:18) at wrapSafe (node:internal/modules/cjs/loader:1039:15) at Module._compile (node:internal/modules/cjs/loader:1073:27) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10) at Module.load (node:internal/modules/cjs/loader:989:32) at Function.Module._load (node:internal/modules/cjs/loader:829:14) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) at node:internal/main/run_main_module:17:47
The text was updated successfully, but these errors were encountered: