deno icon indicating copy to clipboard operation
deno copied to clipboard

Cannot run `npm:@vscode/vsce` from Deno

Open yvvki opened this issue 1 year ago • 1 comments

Version: Deno 2.0.3

I am looking forward in managing my VSCode extension using the Deno 2 package manager. But running deno run -A npm:@vscode/vsce would results in:

error: Uncaught TypeError: chalk_1.default.bgGreen.black is not a function
    at Object.<anonymous> (file:///C:/Users/Nexus/AppData/Local/deno/npm/registry.npmjs.org/@vscode/vsce/3.2.1/out/util.js:145:52)
    at Object.<anonymous> (file:///C:/Users/Nexus/AppData/Local/deno/npm/registry.npmjs.org/@vscode/vsce/3.2.1/out/util.js:370:4)
    at Module._compile (node:module:748:34)
    at Object.Module._extensions..js (node:module:767:10)
    at Module.load (node:module:665:32)
    at Function.Module._load (node:module:537:12)
    at Module.require (node:module:684:19)
    at require (node:module:808:16)
    at Object.<anonymous> (file:///C:/Users/Nexus/AppData/Local/deno/npm/registry.npmjs.org/@vscode/vsce/3.2.1/out/package.js:36:27)
    at Object.<anonymous> (file:///C:/Users/Nexus/AppData/Local/deno/npm/registry.npmjs.org/@vscode/vsce/3.2.1/out/package.js:1553:4)

Other package manager like Bun via bunx @vscode/vsce are able to support this.

yvvki avatar Oct 30 '24 03:10 yvvki

Probably running with --unstable-unsafe-proto will make it work: https://docs.deno.com/runtime/reference/cli/unstable_flags/#--unstable-unsafe-proto

dsherret avatar Oct 30 '24 18:10 dsherret

I will close this one as the solution provided by David is the correct one.

bartlomieju avatar Dec 06 '24 01:12 bartlomieju