Version 3.0.4 works great, but this morning the update to 3.0.5 suddenly started producing this error:
/Users/conord/bela/node_modules/ts-node/src/index.ts:300
throw new TSError(formatDiagnostics(diagnosticList, cwd, ts, lineOffset))
^
TSError: ⨯ Unable to compile TypeScript
File '/Users/conord/bela/node_modules/chalk/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. (6054)
File '/Users/conord/bela/node_modules/fs-extra/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. (6054)
File '/Users/conord/bela/node_modules/minidump/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. (6054)
File '/users/conord/bela/node_modules/@types/node/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. (6054)
at getOutput (/Users/conord/bela/node_modules/ts-node/src/index.ts:300:15)
at /Users/conord/bela/node_modules/ts-node/src/index.ts:330:16
at Object.compile (/Users/conord/bela/node_modules/ts-node/src/index.ts:489:17)
at Module.m._compile (/Users/conord/bela/node_modules/ts-node/src/index.ts:382:43)
at Module._extensions..js (module.js:579:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/conord/bela/node_modules/ts-node/src/index.ts:385:12)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
Same for me. It tries to load package.json files
19:35:40] E/launcher - Error: TSError: ⨯ Unable to compile TypeScript
File '/home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/@types/jasmine/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. (6054)
File '/home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/@types/node/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. (6054)
File '/home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/@types/q/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. (6054)
File '/home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/@types/selenium-webdriver/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. (6054)
File '/home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/blocking-proxy/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. (6054)
File '/home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/events/events.js' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. (6054)
File '/home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/events/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. (6054)
File '/home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/protractor/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. (6054)
File '/home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/q/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. (6054)
File '/home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/selenium-webdriver/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. (6054)
File '/home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/webdriver-js-extender/node_modules/selenium-webdriver/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. (6054)
File '/home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/webdriver-js-extender/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. (6054)
at getOutput (/home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/ts-node/src/index.ts:300:15)
at /home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/ts-node/src/index.ts:330:16
at Object.compile (/home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/ts-node/src/index.ts:489:17)
at Module.m._compile (/home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/ts-node/src/index.ts:382:43)
at Module._extensions..js (module.js:580:10)
at Object.require.extensions.(anonymous function) [as .ts] (/home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/ts-node/src/index.ts:385:12)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at /home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/jasmine/lib/jasmine.js:93:5
at Array.forEach (native)
at Jasmine.loadSpecs (/home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/jasmine/lib/jasmine.js:92:18)
at Jasmine.execute (/home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/jasmine/lib/jasmine.js:197:8)
at /home/tomasz/dev/projects/shardis/shardis-frontend/node_modules/protractor/built/frameworks/jasmine.js:132:15
[19:35:40] E/launcher - Process exited with error code 100
Thanks for the report. I saw this in my own projects also, but didn't see any commit that causes this. If someone wants to submit a PR, feel free to.
Same happened with mine, going back to 3.0.4 solves it for now. Seems like something changed in how js and all other file types are loaded, and they are being loaded via ts-node?
Thanks for the quick fix and release @blakeembrey 💯
Most helpful comment
Thanks for the quick fix and release @blakeembrey 💯