vadimdemedes / pastel

🎨 Next.js-like framework for CLIs made with Ink
https://term.ink/pastel
MIT License
2.18k stars 36 forks source link

Executable does not run #69

Open robertpkoenig opened 6 months ago

robertpkoenig commented 6 months ago

Within the pastel app, I see there is an executable generated. Within the hello-world example, the executable is called hello-world-tui

Wow! That's cool.

When I run this executable on another computer and got the error:

...
/snapshot/hello-world/dist/cli.js:2
import Pastel from 'pastel';
^^^^^^

SyntaxError: Cannot use import statement outside a module
...

I checked and the package.json in my is pastel app is set to "type": "module"

This is the contents of my dist/cli.js , which I did not change from the start code:

#!/usr/bin/env node
import Pastel from 'pastel';
const app = new Pastel({
    importMeta: import.meta,
});
await app.run();
coreyar commented 4 months ago

What version of node are you on? I looked for the example in the repo and I couldn't find it. I think this issue is outdated and could be closed