..
..
DDeno
Created by .. on 8/15/2023 in #help
Confused by deno vendor-related behaviors
I created a main.ts containing this code:
import * as thrift from "npm:thrift";
let connection = thrift.createConnection("localhost", 9160);
import * as thrift from "npm:thrift";
let connection = thrift.createConnection("localhost", 9160);
I ran this command:
noct@ubuntu:~/host_home/projects/godot_engine_4/example/game_mods$ deno vendor --node-modules-dir=true main.ts
Vendored 0 modules into vendor/ directory.
noct@ubuntu:~/host_home/projects/godot_engine_4/example/game_mods$ deno vendor --node-modules-dir=true main.ts
Vendored 0 modules into vendor/ directory.
No vendor/ directory was created, but it generated the following:
noct@ubuntu:~/host_home/projects/godot_engine_4/example/game_mods$ ls -l node_modules/
total 4
lrwxrwxrwx 1 noct users 115 Aug 15 01:37 thrift -> /run/host/xhome/noct/projects/godot_engine_4/example/game_mods/node_modules/.deno/thrift@0.18.1/node_modules/thrift
noct@ubuntu:~/host_home/projects/godot_engine_4/example/game_mods$ ls -l node_modules/
total 4
lrwxrwxrwx 1 noct users 115 Aug 15 01:37 thrift -> /run/host/xhome/noct/projects/godot_engine_4/example/game_mods/node_modules/.deno/thrift@0.18.1/node_modules/thrift
I created a deno.json:
{
"nodeModulesDir": true,
}
{
"nodeModulesDir": true,
}
I then tried to run main.ts:
noct@ubuntu:~/host_home/projects/godot_engine_4/example/game_mods$ deno run --no-remote main.ts
:white_check_mark: Granted read access to "/run/host/xhome/noct/projects/godot_engine_4/example/node_modules".
:white_check_mark: Granted read access to "/run/host/xhome/noct/projects/godot_engine_4/node_modules".
:white_check_mark: Granted read access to "/run/host/xhome/noct/projects/node_modules".
:white_check_mark: Granted read access to "/run/host/xhome/noct/node_modules".
:white_check_mark: Granted read access to "/run/host/xhome/node_modules".
:white_check_mark: Granted read access to "/run/host/node_modules".
:white_check_mark: Granted read access to "/run/node_modules".
:white_check_mark: Granted read access to "/node_modules".
error: Uncaught TypeError: Cannot read properties of undefined (reading 'connect_timeout')
at Module.exports.createConnection (file:///run/host/xhome/noct/projects/godot_engine_4/example/game_mods/node_modules/.deno/thrift@0.18.1/node_modules/thrift/lib/nodejs/lib/thrift/connection.js:269:22)
at file:///run/host/xhome/noct/projects/godot_engine_4/example/game_mods/main.ts:2:25
noct@ubuntu:~/host_home/projects/godot_engine_4/example/game_mods$ deno run --no-remote main.ts
:white_check_mark: Granted read access to "/run/host/xhome/noct/projects/godot_engine_4/example/node_modules".
:white_check_mark: Granted read access to "/run/host/xhome/noct/projects/godot_engine_4/node_modules".
:white_check_mark: Granted read access to "/run/host/xhome/noct/projects/node_modules".
:white_check_mark: Granted read access to "/run/host/xhome/noct/node_modules".
:white_check_mark: Granted read access to "/run/host/xhome/node_modules".
:white_check_mark: Granted read access to "/run/host/node_modules".
:white_check_mark: Granted read access to "/run/node_modules".
:white_check_mark: Granted read access to "/node_modules".
error: Uncaught TypeError: Cannot read properties of undefined (reading 'connect_timeout')
at Module.exports.createConnection (file:///run/host/xhome/noct/projects/godot_engine_4/example/game_mods/node_modules/.deno/thrift@0.18.1/node_modules/thrift/lib/nodejs/lib/thrift/connection.js:269:22)
at file:///run/host/xhome/noct/projects/godot_engine_4/example/game_mods/main.ts:2:25
4 replies
DDeno
Created by .. on 8/14/2023 in #help
How can I send a number across a Deno.TcpConn as stream of bytes?
I need to send a number across a Deno.TcpConn as 4 bytes, so it can be read by a server as an int32.
99 replies
DDeno
Created by .. on 8/6/2023 in #help
I need some guidance regarding interprocess communication with Deno
What are good cross-platform (Windows, Linux) options for interprocess communication / data sharing between a Deno runtime running untrusted code, and another process that is trusted (both are running on the same host)? I recognize there are always risks associated with this, and I don't expect to achieve perfect security; I just don't want to take an approach that is absurdly insecure. Besides security, performance and ease of use are concerns; it would be preferable to not have to create my own protocol, for instance.
9 replies
DDeno
Created by .. on 5/2/2023 in #help
How can I reattach a debugger after disconnecting?
I want to be able to start deno from a command line, but be able to attach to it from VSCode. I actually have that much working, but there is one issue - if I disconnect the debugger, I cannot reattach it. I am running like so: deno run --inspect-wait .\first_steps.ts I am attaching with this configuration:
{
"request": "attach",
"name": "Attach To Running Program",
"type": "node",
"cwd": "${workspaceFolder}",
"port": 9229,
}
{
"request": "attach",
"name": "Attach To Running Program",
"type": "node",
"cwd": "${workspaceFolder}",
"port": 9229,
}
The source code is a couple of loops that each take a few seconds to execute. After hitting a breakpoint in the first loop, I disconnect. I then immediately try to reconnect, but it seems the program ignores the attempt until it finishes running. Is there anything I can do differently to be able to reattach the debugger?
2 replies