pastel icon indicating copy to clipboard operation
pastel copied to clipboard

Executable does not run

Open robertpkoenig opened this issue 11 months ago • 1 comments

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();

robertpkoenig avatar Mar 07 '24 18:03 robertpkoenig

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

coreyar avatar May 15 '24 17:05 coreyar