Closed dafnevk closed 7 years ago
typescript 2.1.4 introduced a breaking change. Downgrading typescript to 2.0.* solves the problem.
npm uninstall typescript
npm install typescript@~2.0.7
Released v0.1.2 on https://www.npmjs.com/package/@nlesc/react-scripts with fix
Ehmm, how is this a solution? Shouldn't we be keeping up with the latest Typescript versions?
If you are reporting a bug, please fill in below. Otherwise feel free to remove this template entirely.
Can you reproduce the problem with latest npm?
Yes
Description
If I create a react app with the tool, I get an compile error when running the app.
npm start
gives the following error: Failed to compile.Error in C:/Users/Dafne van Kuppevelt/Documents/code/nlesc/case-law-app/src/index.tsx Module build failed: TypeError: Cannot read property 'exclude' of undefined @ multi main
npm rum build
gives the following error: Module build failed: TypeError: Cannot read property 'exclude' of undefined at applyDefaults (C:\Users\Dafne van Kuppevelt\Documents\code\nlesc\case-law-app\node_modules\@nlesc\react-scripts\node_modules\awesome-typescript-loader\src\instance.ts:266:72) at Object.ensureInstance (C:\Users\Dafne van Kuppevelt\Documents\code\nlesc\case-law-app\node_modules\@nlesc\react-scripts\node_modules\awesome-typescript-loader\src\instance.ts:145:5) at compiler (C:\Users\Dafne van Kuppevelt\Documents\code\nlesc\case-law-app\node_modules\@nlesc\react-scripts\node_modules\awesome-typescript-loader\src\index.ts:37:20) at Object.loader (C:\Users\Dafne van Kuppevelt\Documents\code\nlesc\case-law-app\node_modules\@nlesc\react-scripts\node_modules\awesome-typescript-loader\src\index.ts:18:18)Environment
Run these commands in the project folder and fill in their results:
npm ls react-scripts
(if you haven’t ejected):case-law-app@0.1.0 C:\Users\Dafne van Kuppevelt\My Documents\code\nlesc\case-law-app
`-- (empty)node -v
: v7.4.0npm -v
: 4.0.5Operating system: Reproduced the error on both Windows and Linux Mint