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
With a typescript template, a browserslist config like ['last 2 chrome versions'] and syntax like ?? in the node_modules, webpack and babel loader throw the following error:
Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
browserslist, babel
Environment
Environment Info:
current version of create-react-app: 4.0.3
running from /Users/rcalcr/.npm/_npx/46062/lib/node_modules/create-react-app
System:
OS: macOS 11.5.2
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 14.17.6 - /usr/local/bin/node
Yarn: Not Found
npm: 6.14.15 - /usr/local/bin/npm
Browsers:
Chrome: 93.0.4577.63
Edge: Not Found
Firefox: Not Found
Safari: 14.1.2
npmPackages:
react: ^17.0.2 => 17.0.2
react-dom: ^17.0.2 => 17.0.2
react-scripts: 4.0.3 => 4.0.3
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
(Write your steps here:)
Run create-react-app test --template typescript
Run npm i @encodable/dimension@1.0.0 --save to add a lib with ?? in the node_modules
Update the browserslist config in package.json to last 2 chrome versions
Add import {getMultipleTextDimensions} from '@encodable/dimension'; to App.tsx
Add the following at the top of the App function component
I had similar problems and it looks like upgrading react-scripts to v5 fixes this. But beware! There's many breaking changes that come with v5 (as a result of webpack5). So while upgrading react-scripts will fix this, it's likely it will introduce other issues you'll need to resolve.
Describe the bug
With a typescript template, a browserslist config like
['last 2 chrome versions']
and syntax like??
in the node_modules, webpack and babel loader throw the following error:Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
browserslist, babel
Environment
Environment Info:
current version of create-react-app: 4.0.3
running from /Users/rcalcr/.npm/_npx/46062/lib/node_modules/create-react-app
System:
OS: macOS 11.5.2
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 14.17.6 - /usr/local/bin/node
Yarn: Not Found
npm: 6.14.15 - /usr/local/bin/npm
Browsers:
Chrome: 93.0.4577.63
Edge: Not Found
Firefox: Not Found
Safari: 14.1.2
npmPackages:
react: ^17.0.2 => 17.0.2
react-dom: ^17.0.2 => 17.0.2
react-scripts: 4.0.3 => 4.0.3
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
(Write your steps here:)
create-react-app test --template typescript
npm i @encodable/dimension@1.0.0 --save
to add a lib with??
in the node_moduleslast 2 chrome versions
import {getMultipleTextDimensions} from '@encodable/dimension';
to App.tsxApp
function componentnpm run build
Expected behavior
The build would successfully complete and build compiled, minified JS
Actual behavior
The build failed with the following error:
Reproducible demo
https://codesandbox.io/s/elastic-feather-lmxsz?file=/package.json
In the demo, open the console and you can see the transform error:
The text was updated successfully, but these errors were encountered: