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
{{ message }}
This repository was archived by the owner on Oct 15, 2020. It is now read-only.
While trying to use react-script-ts to build a TypeScript React app I ran into an issue where compilation fails due to an unsupported option being passed to the node executable: bad option: --max-old-space-size=2048.
The repro is pretty simple:
[KFARNUNG1] E:\GitHub
> npm install -g create-react-app C:\Users\kfarnung\AppData\Local\nvs\chakracore\8.9.4\x64\create-react-app -> C:\Users\kfarnung\AppData\Local\nvs\chakracore\8.9.4\x64\node_modules\create-react-app\index.js + [email protected]updated 1 package in 5.851s [KFARNUNG1] E:\GitHub
> create-react-app --scripts-version=react-scripts-ts my-app Creating a new React app in E:\GitHub\my-app. Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts-ts...
> [email protected] postinstall E:\GitHub\my-app\node_modules\uglifyjs-webpack-plugin
> node lib/post_install.js + [email protected]+ [email protected]+ [email protected]added 1219 packages in 97.966s Installing @types/node, @types/react, @types/react-dom, @types/jest, typescript as dev dependencies npm... npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) + @types/[email protected]+ @types/[email protected]+ @types/[email protected]+ @types/[email protected]+ [email protected]added 6 packages in 25.202s Success! Created my-app at E:\GitHub\my-app Inside that directory, you can run several commands: npm start Starts the development server. npm run build Bundles the app into static files for production. npm test Starts the test runner. npm run eject Removes this tool and copies build dependencies, configuration files and scripts into the app directory. If you do this, you can’t go back! We suggest that you begin by typing: cd my-app npm start Happy hacking! [KFARNUNG1] E:\GitHub
> cd .\my-app\ [KFARNUNG1] E:\GitHub\my-app
> npm run build
> [email protected] build E:\GitHub\my-app
> react-scripts-ts build Failed to load tsconfig.json: Missing baseUrl in compilerOptions Creating an optimized production build... Found no baseUrl in tsconfig.json, not applying tsconfig-paths-webpack-plugin Found no baseUrl in tsconfig.json, not applying tsconfig-paths-webpack-plugin C:\Users\kfarnung\AppData\Local\nvs\chakracore\8.9.4\x64\node.exe: bad option: --max-old-space-size=2048 Starting type checking and linting service... Using 1 worker with 2048MB memory limit Cannot start checker service: Error: write EPIPE ts-loader: Using [email protected] and E:\GitHub\my-app\tsconfig.json
While trying to use
react-script-tsto build a TypeScript React app I ran into an issue where compilation fails due to an unsupported option being passed to the node executable:bad option: --max-old-space-size=2048.The repro is pretty simple: