Skip to content
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

CLI doesn't work on file in working directory without explicit ./ #164

Open
ajyoon opened this issue Dec 27, 2021 · 0 comments
Open

CLI doesn't work on file in working directory without explicit ./ #164

ajyoon opened this issue Dec 27, 2021 · 0 comments

Comments

@ajyoon
Copy link

ajyoon commented Dec 27, 2021

When calling the CLI on a file in the current directory, an explicit ./ must be prepended to the file name or else it tries to open a file missing the first character. I am encountering this error from Arch Linux using bash.

diagrams $ npx nomnoml test.noml
node:internal/fs/utils:344
    throw err;
    ^

Error: ENOENT: no such file or directory, open 'est.noml'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at loadFile (/home/ayoon/.npm/_npx/91674ad181a985c9/node_modules/nomnoml/dist/nomnoml.js:2135:23)
    at Object.compileFile (/home/ayoon/.npm/_npx/91674ad181a985c9/node_modules/nomnoml/dist/nomnoml.js:2137:31)
    at Object.<anonymous> (/home/ayoon/.npm/_npx/91674ad181a985c9/node_modules/nomnoml/dist/nomnoml-cli.js:21:37)
    at Module._compile (node:internal/modules/cjs/loader:1097:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: 'est.noml'
}

While

diagrams $ npx nomnoml ./test.noml
[succeeds]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant