Not working. #206

Open
opened 2023-11-25 20:04:58 +00:00 by UmarNoor · 6 comments
UmarNoor commented 2023-11-25 20:04:58 +00:00 (Migrated from github.com)

Getting the below error when trying to strt the local server for localtunnel.....
umar@ssdocker001:~/localtunnel-server/bin$ ./server --port 3400 --domain ssdocker001.server.local
/usr/bin/env: ‘node -r esm’: No such file or directory

Tried giving the full absolute path of the node executable but still getting the same error... something like below
#!/usr/bin/env /usr/bin/node -r esm

However, node is properly set up in the PATH variable as below:...
umar@ssdocker001:/usr/bin$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/umar/nodejs/bin

umar@ssdocker001:/usr/bin$ ls -lrt node
lrwxrwxrwx 1 root root 29 Nov 26 01:20 node -> /home/umar/nodejs/bin/node**

Node is working fine without mention of any path as well.....
umar@ssdocker001:~/localtunnel-server/bin$ node
Welcome to Node.js v14.15.0.
Type ".help" for more information.
>

Getting the below error when trying to strt the local server for localtunnel..... **umar@ssdocker001:~/localtunnel-server/bin$ ./server --port 3400 --domain ssdocker001.server.local** **/usr/bin/env: ‘node -r esm’: No such file or directory** Tried giving the full absolute path of the node executable but still getting the same error... something like below **#!/usr/bin/env /usr/bin/node -r esm** However, node is properly set up in the PATH variable as below:... **umar@ssdocker001:/usr/bin$ echo $PATH** **/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/umar/nodejs/bin** **umar@ssdocker001:/usr/bin$ ls -lrt node** **lrwxrwxrwx 1 root root 29 Nov 26 01:20 node -> /home/umar/nodejs/bin/node**** Node is working fine without mention of any path as well..... **umar@ssdocker001:~/localtunnel-server/bin$ node** **Welcome to Node.js v14.15.0.** **Type ".help" for more information.** **>**
unkn0wncvm1 commented 2024-01-11 07:02:30 +00:00 (Migrated from github.com)

try running node -r esm ./bin/server it worked for me

try running `node -r esm ./bin/server` it worked for me
unkn0wncvm1 commented 2024-01-23 19:00:06 +00:00 (Migrated from github.com)

if it worked please close the issue

if it worked please close the issue
evokelektrique commented 2024-01-26 14:01:04 +00:00 (Migrated from github.com)
$ node -r esm ./bin/server --port 1234
  localtunnel server listening on port: 1234 +0ms

it worked

``` $ node -r esm ./bin/server --port 1234 localtunnel server listening on port: 1234 +0ms ``` it worked
xiaoyuvax commented 2024-07-11 04:17:08 +00:00 (Migrated from github.com)

seems not work for windows:

file:///E:/LocalTunnelServer/server/bin/server:1
SyntaxError: Error parsing E:\LocalTunnelServer\server\node_modules\localenv\package.json: Unexpected non-whitespace character after JSON at position 772
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10) {
path: 'E:\LocalTunnelServer\server\node_modules\localenv\package.json'
}

what can i do?

seems not work for windows: file:///E:/LocalTunnelServer/server/bin/server:1 SyntaxError: Error parsing E:\LocalTunnelServer\server\node_modules\localenv\package.json: Unexpected non-whitespace character after JSON at position 772 at Module._extensions..js (node:internal/modules/cjs/loader:1416:10) { path: 'E:\\LocalTunnelServer\\server\\node_modules\\localenv\\package.json' } what can i do?
unkn0wncvm1 commented 2024-07-11 18:05:41 +00:00 (Migrated from github.com)

seems not work for windows:

file:///E:/LocalTunnelServer/server/bin/server:1 SyntaxError: Error parsing E:\LocalTunnelServer\server\node_modules\localenv\package.json: Unexpected non-whitespace character after JSON at position 772 at Module._extensions..js (node:internal/modules/cjs/loader:1416:10) { path: 'E:\LocalTunnelServer\server\node_modules\localenv\package.json' }

what can i do?

you could try editing the file to fix the non whitespace issue

> seems not work for windows: > > file:///E:/LocalTunnelServer/server/bin/server:1 SyntaxError: Error parsing E:\LocalTunnelServer\server\node_modules\localenv\package.json: Unexpected non-whitespace character after JSON at position 772 at Module._extensions..js (node:internal/modules/cjs/loader:1416:10) { path: 'E:\LocalTunnelServer\server\node_modules\localenv\package.json' } > > what can i do? you could try editing the file to fix the non whitespace issue
xiaoyuvax commented 2024-07-16 07:13:34 +00:00 (Migrated from github.com)

seems not work for windows:
file:///E:/LocalTunnelServer/server/bin/server:1 SyntaxError: Error parsing E:\LocalTunnelServer\server\node_modules\localenv\package.json: Unexpected non-whitespace character after JSON at position 772 at Module._extensions..js (node:internal/modules/cjs/loader:1416:10) { path: 'E:\LocalTunnelServer\server\node_modules\localenv\package.json' }
what can i do?

you could try editing the file to fix the non whitespace issue

i don't think it's the non-whitespace problem, for it comes with a mature frequently referenced package, not quite possible to be wrong.

> > seems not work for windows: > > file:///E:/LocalTunnelServer/server/bin/server:1 SyntaxError: Error parsing E:\LocalTunnelServer\server\node_modules\localenv\package.json: Unexpected non-whitespace character after JSON at position 772 at Module._extensions..js (node:internal/modules/cjs/loader:1416:10) { path: 'E:\LocalTunnelServer\server\node_modules\localenv\package.json' } > > what can i do? > > you could try editing the file to fix the non whitespace issue i don't think it's the non-whitespace problem, for it comes with a mature frequently referenced package, not quite possible to be wrong.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: hoelee/server#206
No description provided.