Closed PaulJPhilp closed 8 months ago
This is probably a mismatch from the recent commit that changed the entrypoint to dist (in prep for distributing as an npm package).
I’ll try to replicate soon and get back to you, thanks for reporting!
Thanks. I just remembered that I made a change to the package.json file. I added "type: module". I did this to resolve an earlier error:
(node:63212) Warning: To load an ES module, set "type": "module" in the
package.json or use the .mjs extension. (Use
node --trace-warnings ...
to show where the warning was created) /Users/paul/projects/pkl-typescript/bin/pkl-gen-typescript.ts:2 import pklGenTypescript from "../pkl-gen-typescript/main"; ^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:77:18) at wrapSafe (node:internal/modules/cjs/loader:1288:20) at Module._compile (node:internal/modules/cjs/loader:1340:27) at Module._extensions..js (node:internal/modules/cjs/loader:1435:10) at Module.load (node:internal/modules/cjs/loader:1207:32) at Module._load (node:internal/modules/cjs/loader:1023:12) at Function.executeUserEntryPoint [as runMain]
(node:internal/modules/run_main:135:12) at node:internal/main/run_main_module:28:49
On Sun, Mar 17, 2024 at 8:32 PM Jason Gwartz @.***> wrote:
This is probably a mismatch from the recent commit that changed the entrypoint to dist (in prep for distributing as an npm package).
I’ll try to replicate soon and get back to you, thanks for reporting!
— Reply to this email directly, view it on GitHub https://github.com/pkl-community/pkl-typescript/issues/32#issuecomment-2002684099, or unsubscribe https://github.com/notifications/unsubscribe-auth/BA6V6ZTOEDQ7YK5XNMHW5HTYYYY3VAVCNFSM6AAAAABE2TIKXKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBSGY4DIMBZHE . You are receiving this because you authored the thread.Message ID: @.***>
@PaulJPhilp We've just started publishing releases to NPM, would you please try uninstalling the git dependency (or npm link) and re-installing using npm i @pkl-community/pkl-typescript
? Then you should be able to use npx pkl-gen-typescript
as expected. Let me know if it works!
Yes, it works!
Thank you.
Back to work.
Paul
On Sat, Mar 30, 2024 at 8:10 AM Jason Gwartz @.***> wrote:
@PaulJPhilp https://github.com/PaulJPhilp We've just started publishing releases to NPM, would you please try uninstalling the git dependency (or npm link) and re-installing using npm i @pkl-community/pkl-typescript? Then you should be able to use npx pkl-gen-typescript as expected. Let me know if it works!
— Reply to this email directly, view it on GitHub https://github.com/pkl-community/pkl-typescript/issues/32#issuecomment-2028030636, or unsubscribe https://github.com/notifications/unsubscribe-auth/BA6V6ZQCOLXMNYL7QXHF36LY22TVFAVCNFSM6AAAAABE2TIKXKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRYGAZTANRTGY . You are receiving this because you were mentioned.Message ID: @.***>
Glad to hear! Thanks again for being an early tester 🙏
I cloned the pkl-typescript repo to get most recent changes.
I run the command: npx pkl-gen-typescript pklState/Event.pkl -o pklState/typescript
I get the following error: