ParseError: 'import' and 'export' may appear only with 'sourceType: module'
- Dominant language
- TypeScript
- Stars
- 447
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
I'm getting a build error when trying to import any of the libraries
```sh
node_modules\typeconv\dist\index.js:1
export * from "./types.js";
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'
```
main.ts
```ts
import {
getTypeScriptReader,
getOpenApiWriter,
makeConverter,
getTypeScriptWriter,
getOpenApiReader,
} from "typeconv"
```
tsconfig.json
```json
"target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
"lib": [
"DOM",
"ES2016"
],
"module": "CommonJS", /* Specify what module code is generated. */
```
package.json
```json
"build:client": "npm run mkdir:dist && browserify src/main.ts -p [ tsify --noImplicitAny ] > dist/bundle.js",
```
`npm run build;client`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.