guybedford / chomp

'JS Make' - parallel task runner for the frontend ecosystem with a JS extension system.
https://chompbuild.com
Apache License 2.0
138 stars 7 forks source link

`chp svelte`: Error: EISDIR: illegal operation on a directory, read #19

Closed canadaduane closed 2 years ago

canadaduane commented 2 years ago

I have the following chompfile.toml in an empty directory (or, with src and dist folders--same result):

version = 0.1

[[task]]
  name = "svelte"
  template = "chomp:svelte"
  [task.args]
    indir = "src"
    outdir = "dist"

When I type chp svelte I get the following error (and I don't understand what's going on):

- package.json [- 303.066µs]
- node_modules/svelte [- 702.144µs]
- node_modules/mkdirp [- 700.336µs]
○ :svelte
node:internal/process/esm_loader:94
    internalBinding('errors').triggerUncaughtException(
                              ^

[Error: EISDIR: illegal operation on a directory, read] {
  errno: -21,
  code: 'EISDIR',
  syscall: 'read'
}
guybedford commented 2 years ago

See https://github.com/guybedford/chomp/issues/17#issuecomment-1007134652, the process.env.TARGET is undefined, so the JS is trying to read the base directory as the svelte file or something like that I think.