Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extends Array support is breaking ts-node #167

Open
binarykitchen opened this issue Apr 3, 2023 · 6 comments
Open

extends Array support is breaking ts-node #167

binarykitchen opened this issue Apr 3, 2023 · 6 comments

Comments

@binarykitchen
Copy link

ts-node is throwing this error when you use the new feature, have an array under extends and run Jest tests whose config files are in TS:

  TypeError: value.replace is not a function
      at normalizeSlashes (/home/michael-heuberger/code/artemis/node_modules/ts-node/dist/util.js:63:18)
      at Object.getExtendsConfigPath (/home/michael-heuberger/code/artemis/node_modules/ts-node/dist/ts-internals.js:24:54)
      at readConfig (/home/michael-heuberger/code/artemis/node_modules/ts-node/dist/configuration.js:127:64)
      at findAndReadConfig (/home/michael-heuberger/code/artemis/node_modules/ts-node/dist/configuration.js:50:84)
      at create (/home/michael-heuberger/code/artemis/node_modules/ts-node/dist/index.js:146:69)
      at Module.register (/home/michael-heuberger/code/artemis/node_modules/ts-node/dist/index.js:127:19)
      at registerTsNode (/home/michael-heuberger/code/artemis/node_modules/jest-config/build/readConfigFileAndSetRootDir.js:175:19)
      at async loadTSConfigFile (/home/michael-heuberger/code/artemis/node_modules/jest-config/build/readConfigFileAndSetRootDir.js:151:30)
      at async readConfigFileAndSetRootDir (/home/michael-heuberger/code/artemis/node_modules/jest-config/build/readConfigFileAndSetRootDir.js:104:22)
      at async readInitialOptions (/home/michael-heuberger/code/artemis/node_modules/jest-config/build/index.js:389:15)

when having

"extends": ["@artemis/tsconfig-node/tsconfig", "@tsconfig/create-react-app/tsconfig"],
@orta
Copy link
Member

orta commented Apr 3, 2023

Perhaps you need to update ts-node? Or send them a PR helping their support for array extends 👍🏻

@binarykitchen
Copy link
Author

Already using latest version here and sorry, as a father I do not have time.

@JamieMagee
Copy link
Contributor

This is already fixed in ts-node, but not yet in a release. See TypeStrong/ts-node#1958

@jensbodal
Copy link

There does not seem to be any immediate plan to release a version with support for Typescript v5. This is likely the early days of many similar issues across different repos (like this one and commitlint) as people begin to upgrade to v5.

ts-node recommends installing from git to get latest changes which is not a great solution for us.

ts-node milestones

@schamane
Copy link

schamane commented May 16, 2023

Not only ts-node, also tsconfig-resolver is not parsing array on extension attribute :(
This breaks eslint and bunch of other frameworks...

image

I have ticket for that:
ifiokjr/tsconfig-resolver#33

@FreePhoenix888
Copy link

TypeStrong/ts-node#2000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants