DenoDDeno
Powered by
varunpramanikV
Denoβ€’2y agoβ€’
1 reply
varunpramanik

npm executable script error: 'node:process' does not provide an export named 'execPath'

Hi there! I'm testing Deno's ability to directly execute npm packages with bin entries ( https://docs.deno.com/runtime/reference/npm/ ). In particular, I'm testing it against likec4 ( https://www.npmjs.com/package/likec4 ). The LikeC4 CLI ( https://likec4.dev/tooling/cli/ ) offers commands to build, serve, export, etc. The ordinary way it's recommended for use is either via an npm local install or using npx.

On paper, it seems like a command like
deno run --allow-read --allow-write npm:likec4 export png -o ./
deno run --allow-read --allow-write npm:likec4 export png -o ./
should work. However, it throws with the error message
Uncaught SyntaxError: The requested module 'node:process' does not provide an export named 'execPath'
Uncaught SyntaxError: The requested module 'node:process' does not provide an export named 'execPath'
. I've attempted to search through the deno documentation, Twitter, and the web for anything relevant. I see that Deno includes a process.execPath property, but I can't figure out how it could be used in the context of an executable script.

I'd appreciate any help or insight anyone could offer. My use case isn't mission critical, it's just a personally relevant example I'm using to learn more about what Deno is capable of. If you would like to try reproducing the error, create a directory with a .c4 file in it (ex: ./example.c4). Within that file, you can paste in a sample LikeC4 definition, such as this one: https://playground.likec4.dev/w/bigbank/ . Finally, with your command line scoped to that directory, run the command I shared previously:
deno run --allow-read --allow-write npm:likec4 export png -o ./
deno run --allow-read --allow-write npm:likec4 export png -o ./


Thank you! Lots of love for Deno.
npm
likec4
Latest version: 1.10.1, last published: 14 hours ago. Start using likec4 in your project by running
npm i likec4
npm i likec4
. There are no other projects in the npm registry using likec4.
likec4
LikeC4
LikeC4 CLI
How to use LikeC4 command-line interface for various operations and automation.
LikeC4 CLI
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

error: module 'node:fs' does not provide an export named 'globSync'
OxooxoOOxooxo / help
15mo ago
does not provide an export named... module import
ChilliSniffCChilliSniff / help
4y ago
The requested module 'npm:@jest/globals' does not provide an export named 'describe'
bzm3rBbzm3r / help
12mo ago
The requested module does not provide an export named 'default'
WillduneWWilldune / help
3y ago