Caporal.js
Caporal.js copied to clipboard
[Documentation] import err
Describe the bug
import error
https://caporal.io/guide/#commands
import program from "@caporal/core"
tobe
import { program } from "@caporal/core"
To Reproduce Steps to reproduce the behavior:
./hello.ts order margherita -e pepperoni
Expected behavior A clear and concise description/output of what you expected to happen.
info: Order received: margherita
info: Extra: pepperoni
Actual behavior
/usr/local/lib/node_modules/ts-node/src/index.ts:513
return new TSError(diagnosticText, diagnosticCodes)
^
TSError: ⨯ Unable to compile TypeScript:
hello.ts:3:8 - error TS1192: Module '"@caporal/core"' has no default export.
3 import program from "@caporal/core"
~~~~~~~
node_modules/@caporal/core/dist/index.d.ts:1828:5
1828 export * from "index";
~~~~~~~~~~~~~~~~~~~~~~
'export *' does not re-export a default.
at createTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:513:12)
at reportTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:517:19)
at getOutput (/usr/local/lib/node_modules/ts-node/src/index.ts:752:36)
at Object.compile (/usr/local/lib/node_modules/ts-node/src/index.ts:968:32)
at Module.m._compile (/usr/local/lib/node_modules/ts-node/src/index.ts:1056:42)
at Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Object.require.extensions.<computed> [as .ts] (/usr/local/lib/node_modules/ts-node/src/index.ts:1059:12)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
Environment informations (please complete the following information):
- OS: Mac
- OS version: catalina 10.15.6
- Shell: iterm
- Caporal version: 2.0.2
Additional context Add any other context about the problem here.