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
I am having this issue as well, but with TS 3.9.7, and npm 6.14.7.
After running npm install react-scripts@latest
$ npm start
> project@0.1.0 start D:\dev\js\project
> react-scripts start
D:\dev\js\project\node_modules\react-scripts\scripts\utils\verifyTypeScriptSetup.js:231
appTsConfig.compilerOptions[option] = suggested;
^
TypeError: Cannot add property noFallthroughCasesInSwitch, object is not extensible
at verifyTypeScriptSetup (D:\dev\js\project\node_modules\react-scripts\scripts\utils\verifyTypeScriptSetup.js:231:45)
at Object.<anonymous> (D:\dev\js\project\node_modules\react-scripts\scripts\start.js:31:1)
at Module._compile (internal/modules/cjs/loader.js:1251:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1272:10)
at Module.load (internal/modules/cjs/loader.js:1100:32)
at Function.Module._load (internal/modules/cjs/loader.js:962:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47
sorry I would have written a longer reply at the time but I was on the phone chatting to someone with this exactly problem at the time :)
I actually found this snippet in another variation of this bug elsewhere in this repo. I think that the cause is something to do with the assumptions about what the expected config is have changed and there's no automated migration.
But, yes, adding this to the release notes and or upgrading the error handling with a more useful error message would be neat.
Activity
malcolm-kee commentedon Oct 25, 2020
Have you tried delete your
yarn.lock
/package-lock.json
and install again?I just upgraded one of my projects and typescript 4 support is fine.
MichaelHindley commentedon Oct 25, 2020
@malcolm-kee very much so. Are you also using npm v7.0.5?
malcolm-kee commentedon Oct 25, 2020
@MichaelHindley opps, I am using npm 6. Sorry I miss out that 😅
mafull commentedon Oct 27, 2020
I've got the same issue -
npm v7.0.3
,react-scripts v4.0.0
ouifi commentedon Oct 27, 2020
I am having this issue as well, but with TS 3.9.7, and npm 6.14.7.
After running
npm install react-scripts@latest
ggascoigne commentedon Oct 28, 2020
Add
"noFallthroughCasesInSwitch": true,
to your tsconfig.json.riceboyler commentedon Oct 28, 2020
Can I suggest that this little tidbit be added to the Release Notes? (I know that's not on you @ggascoigne)
ggascoigne commentedon Oct 28, 2020
sorry I would have written a longer reply at the time but I was on the phone chatting to someone with this exactly problem at the time :)
I actually found this snippet in another variation of this bug elsewhere in this repo. I think that the cause is something to do with the assumptions about what the expected config is have changed and there's no automated migration.
But, yes, adding this to the release notes and or upgrading the error handling with a more useful error message would be neat.