-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running scripts in %PATH%: Uncaught NotFound #102
Comments
Just tested in Mac OS, it could run normally. which denon
/Users/quaos/.deno/bin/denon
denon --version
[*] [main] v2.3.3
denon build
[*] [main] v2.3.3
[!] [#0] starting `denopack -c denopack.config.ts`
Generated denopack config: {
input: "src/client.tsx",
output: { dir: "./public/assets/js", sourcemap: true, format: "es" },
plugins: [
{ name: "denopack-plugin-importResolver", resolveId: [Function: resolver] },
{ name: "denopack-plugin-cacheLoader", load: [AsyncFunction: load] },
{ name: "denopack-plugin-fileLoader", load: [AsyncFunction: load] },
{
name: "denopack-plugin-typescriptTransform",
transform: [AsyncFunction: transform]
}
]
}
denopack completed in 8275ms
[*] [daem] clean exit - denon is exiting ... |
I think this could be an issue related to |
Thanks. As for now, I'm using workaround like this: let cmd = ["denopack", "-c", "denopack.config.ts"];
// Workaround for Windows
// @ts-ignore TS2367
if (/^(win|windows)$/.test(Deno.build.os)) {
cmd = ["cmd", "/c"].concat(cmd);
}
const process: Deno.Process = Deno.run({
cmd,
env: Deno.env.toObject(),
}); |
I can't seem to replicate this on my windows machine? But I will make a patch for it anyways as it seems like a harmless thing to do which should solve your and other peoples problems. #105 should fix your issue |
Also update your deno version 😉 |
The fix for this seems to be causing issues for me. With cmd /c used, when denon restarts the process, it closes the cmd process but deno processes that were launched from it stay open. In my case this prevents the new process from binding to the same port and it crashes. Removing the fix solves this. |
@PavelFlegr Think you could submit a pr for it and I will reopen this issue as it not properly closing seems like a bigger issue? |
To solve this issue I think we should be able to manually just resolve the |
It's a very small change but here's the pr #110 |
Window 10: 19042.630
Create console.log('this is denopack');
console.log(Deno.args); and install it: $ deno install denopack.ts
Check file:///C:/Users/path/to/denopack.ts
✅ Successfully installed denopack {
"$schema": "https://deno.land/x/denon/schema.json",
"scripts": {
"start": {
"cmd": "denopack -c denopack.config.ts",
"desc": "run my app.ts file"
}
}
} Let run $ denon start
[*] [main] v2.4.4
[*] [daem] watching path(s): *.*
[*] [daem] watching extensions: ts,tsx,js,jsx,json
[!] [#0] starting `denopack -c denopack.config.ts`
this is denopack
[ "-c", "denopack.config.ts" ]
[*] [daem] clean exit - waiting for changes before restart Hmmm! No error :) Can you change |
Describe the bug
I'm working on both Windows 10 and MacOS machines.
Now running on Windows, I'm trying to setup denon script to call
denopack
which is in my%HOME%\.deno\bin
and already included in%PATH%
but goterror: Uncaught NotFound: The system cannot find the file specified. (os error 2)
To Reproduce
denopack
is installed in %PATH%denon build
Expected behavior
It should run
denopack -c denopack.config.ts
Configuration or Project
If applicable, add your denon configuration file or project so we can accurately test our solution.
Screenshots
Setup
Additional context
It can't neither find and run denon itself in
%PATH%
.The text was updated successfully, but these errors were encountered: