DenoDDeno
Powered by
...
Denoβ€’3y agoβ€’
3 replies
..

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/
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
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

`deno vendor` + `/// <reference types=...>` ?
Carlos ScheideggerCCarlos Scheidegger / help
2y ago
Scraping Hackernews for Deno-related projects
πΠπ / help
4y ago
`deno vendor`: help with import_map.json changes from deno.land to jsr?
Carlos ScheideggerCCarlos Scheidegger / help
2y ago