Closed
Description
Describe the bug
I updated a typescript CRA project (previously on ^3.4.0
react-scripts version) to use react-scripts "next" version to try out 4.0 alpha (following https://gist.github.com/iansu/282dbe3d722bd7231fa3224c0f403fa1), but encountered this error when running yarn start
yarn run v1.22.4
$ craco start
/Users/kwuang/github/suma-web/node_modules/react-scripts/scripts/utils/verifyTypeScriptSetup.js:210
appTsConfig.compilerOptions[option] = suggested;
^
TypeError: Cannot add property noFallthroughCasesInSwitch, object is not extensible
at verifyTypeScriptSetup (/Users/kwuang/github/suma-web/node_modules/react-scripts/scripts/utils/verifyTypeScriptSetup.js:210:45)
at Object.<anonymous> (/Users/kwuang/github/suma-web/node_modules/react-scripts/scripts/start.js:31:1)
at Module._compile (internal/modules/cjs/loader.js:1151:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Module.require (internal/modules/cjs/loader.js:1040:19)
at require (internal/modules/cjs/helpers.js:72:18)
at start (/Users/kwuang/github/suma-web/node_modules/@craco/craco/lib/cra.js:202:5)
at Object.<anonymous> (/Users/kwuang/github/suma-web/node_modules/@craco/craco/scripts/start.js:27:1)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Did you try recovering your dependencies?
(Write your answer here.)
Which terms did you search for in User Guide?
(Write your answer here if relevant.)
Environment
Environment Info:
current version of create-react-app: 3.4.1
running from /Users/kwuang/github/suma-web/node_modules/create-react-app
System:
OS: macOS 10.15.3
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 13.7.0 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.13.6 - /usr/local/bin/npm
Browsers:
Chrome: 84.0.4147.105
Firefox: 74.0.1
Safari: 13.0.5
npmPackages:
react: ^16.13.1 => 16.13.1 (16.12.0)
react-dom: ^16.13.1 => 16.13.1 (16.12.0)
react-scripts: next => 4.0.0-next.77+3d74b79d
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
(Write your steps here:)
- change to
next
version of react-scripts inpackage.json
yarn
to install new depsyarn start
Expected behavior
Expected yarn start
to work as before.
Actual behavior
Has console output (see above).
Reproducible demo
(Paste the link to an example project and exact instructions to reproduce the issue.)