https://github.com/jonaskello/tsconfig-paths-main-cjs
Reproduction of a problem in tsconfig-paths
https://github.com/jonaskello/tsconfig-paths-main-cjs
Last synced: about 1 year ago
JSON representation
Reproduction of a problem in tsconfig-paths
- Host: GitHub
- URL: https://github.com/jonaskello/tsconfig-paths-main-cjs
- Owner: jonaskello
- Created: 2020-07-23T20:11:08.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T20:24:35.000Z (over 3 years ago)
- Last Synced: 2024-10-06T02:21:23.964Z (over 1 year ago)
- Language: TypeScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# How to install and run
Install:
```
yarn
```
This works (without tsconfig-paths loaded):
```
yarn start
```
This does not work (with tsconfig-paths loaded):
```
yarn start-paths
```
# Ouput
```
$ node --version
v12.14.1
$ yarn start
yarn run v1.21.1
$ tsc && node ./lib/main.js
Engage!
Beets are red,
Plums are blue,
Colorette!.
Done in 0.54s.
$ yarn start-paths
yarn run v1.21.1
$ tsc && node -r tsconfig-paths/register ./lib/main.js
/home/jonkel/code/github/jonaskello/tsconfig-paths-main-cjs/node_modules/colorette/index.js:28
export const options = Object.defineProperty({}, "enabled", {
^^^^^^
SyntaxError: Unexpected token 'export'
at Module._compile (internal/modules/cjs/loader.js:891:18)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
at Module.load (internal/modules/cjs/loader.js:811:32)
at Function.Module._load (internal/modules/cjs/loader.js:723:14)
at Module.require (internal/modules/cjs/loader.js:848:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/home/jonkel/code/github/jonaskello/tsconfig-paths-main-cjs/lib/main.js:3:19)
at Module._compile (internal/modules/cjs/loader.js:955:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
at Module.load (internal/modules/cjs/loader.js:811:32)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```