You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that auto.config.ts as described in the docs doesn't when user's project specifies "module": "es2015" (not "commonjs") in its tsconfig.json.
This is a problem upstream in @endemolshinegroup/cosmiconfig-typescript-loader, but I wanted to leave this issue here for other people encountering the error.
To Reproduce
A fast way:
Copy auto.config.ts to your nearest project with auto.
Change your tsconfig.json module setting to one preserving ES6 imports (e.g. "es2015")
⇝ yarn auto shipit
yarn run v1.22.5
$ /home/hasparus/workspace/theme-ui/node_modules/.bin/auto shipit
TypeScriptCompileError: Failed to compile TypeScript: Unexpected token 'export'
at Function.TypeScriptCompileError.fromError (/home/hasparus/workspace/theme-ui/node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/src/Errors/TypeScriptCompileError.ts:20:12)
Environment information:
I don't expect it to be relevant but info crashes too.
Should info command crash when the config is broken?
$ /home/hasparus/workspace/theme-ui/node_modules/.bin/auto info
TypeScriptCompileError: Failed to compile TypeScript: Unexpected token 'export'
at Function.TypeScriptCompileError.fromError (/home/hasparus/workspace/theme-ui/node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/src/Errors/TypeScriptCompileError.ts:20:12)
at /home/hasparus/workspace/theme-ui/node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/src/index.ts:14:34
at Generator.next (<anonymous>)
at /home/hasparus/workspace/theme-ui/node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/node_modules/tslib/tslib.js:117:75
at new Promise (<anonymous>)
at Object.__awaiter (/home/hasparus/workspace/theme-ui/node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/node_modules/tslib/tslib.js:113:16)
at loader (/home/hasparus/workspace/theme-ui/node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/src/index.ts:6:51)
at Explorer.loadFileContent (/home/hasparus/workspace/theme-ui/node_modules/cosmiconfig/src/Explorer.ts:81:32)
at Explorer.createCosmiconfigResult (/home/hasparus/workspace/theme-ui/node_modules/cosmiconfig/src/Explorer.ts:89:36)
at Explorer.loadSearchPlace (/home/hasparus/workspace/theme-ui/node_modules/cosmiconfig/src/Explorer.ts:65:31)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
You don't realize how much time you saved me with auto. I made a first automatic stable release today (after using patch-package to work around this issue), and the only things I had to do were reformatting the changelog and writing an announcement on Discord. This a drastic improvement to my life. Thank you once again.
Describe the bug
It seems that auto.config.ts as described in the docs doesn't when user's project specifies
"module": "es2015"
(not"commonjs"
) in its tsconfig.json.This is a problem upstream in @endemolshinegroup/cosmiconfig-typescript-loader, but I wanted to leave this issue here for other people encountering the error.
To Reproduce
A fast way:
"es2015"
)A way I'm 100% sure will crash as expected:
3a92b715cb83481004dd91b8fe19d5147711411a
yarn auto shipit
Expected behavior
Config copied from the docs works.
Screenshots
Environment information:
I don't expect it to be relevant but info crashes too.
Should
info
command crash when the config is broken?$ /home/hasparus/workspace/theme-ui/node_modules/.bin/auto info TypeScriptCompileError: Failed to compile TypeScript: Unexpected token 'export' at Function.TypeScriptCompileError.fromError (/home/hasparus/workspace/theme-ui/node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/src/Errors/TypeScriptCompileError.ts:20:12) at /home/hasparus/workspace/theme-ui/node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/src/index.ts:14:34 at Generator.next (<anonymous>) at /home/hasparus/workspace/theme-ui/node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/node_modules/tslib/tslib.js:117:75 at new Promise (<anonymous>) at Object.__awaiter (/home/hasparus/workspace/theme-ui/node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/node_modules/tslib/tslib.js:113:16) at loader (/home/hasparus/workspace/theme-ui/node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/src/index.ts:6:51) at Explorer.loadFileContent (/home/hasparus/workspace/theme-ui/node_modules/cosmiconfig/src/Explorer.ts:81:32) at Explorer.createCosmiconfigResult (/home/hasparus/workspace/theme-ui/node_modules/cosmiconfig/src/Explorer.ts:89:36) at Explorer.loadSearchPlace (/home/hasparus/workspace/theme-ui/node_modules/cosmiconfig/src/Explorer.ts:65:31) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
actual result after I edited comiconfig code
The text was updated successfully, but these errors were encountered: