Confused by deno vendor-related behaviors
I created a main.ts containing this code:
I ran this command:
No
I created a deno.json:
I then tried to run main.ts:
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/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/thriftnoct@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/thriftI 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:25noct@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