isAdrisal
isAdrisal7d ago

Running node/npm scripts with Deno

I am trying to use Deno in place of npm for a particular project. I run deno install and it appears to install deps just fine from the package.json. The scripts in the package.json are a series of tsx scripts, like:
{
scripts: {
test: "tsx src/test.ts"
}
},
{
scripts: {
test: "tsx src/test.ts"
}
},
When I run deno task test I get an error like:
error: unexpected argument '--require' found

  tip: to pass '--require' as a value, use '-- --require'
error: unexpected argument '--require' found

  tip: to pass '--require' as a value, use '-- --require'
Should this use case work? If so, could you let me know what I'm missing? Edit to add: tsx is included as a devDepencies entry in the package.json. Thank you!
2 Replies
marvinh.
marvinh.7d ago
That sounds like a bug. Can you file an issue https://github.com/denoland/deno/issues ?
isAdrisal
isAdrisalOP6d ago
GitHub
Can't run npm scripts using deno task · Issue #30538 · denola...
Version: Deno 2.4.5 I reported this first on Discord and was asked to file a bug: https://discord.com/channels/684898665143206084/1409773999084408853 I've created a minimal repro project with i...

Did you find this page helpful?