TypeError [ERR_INVALID_ARG_TYPE]
See original GitHub issueStarted getting TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
in multiple CRA projects after dependency updates today.
Updating react-scripts
solved the issue in my unejected apps, but I still have no solution for ejected ones. I’ve tried updating react-dev-utils
manually but am still seeing it on yarn start
- anyone with ejected CRAs have this issue?
Edit: Downgrading react-dev-utils
to 10.0.0
resolves the error for ejected apps in development mode only, but will not work in production or served over HTTPS due to https://github.com/facebook/create-react-app/issues/8075 which was not fixed until after 10.0.0
.
Edit 2: @syberen said:
I solved it the hard way, by creating a new react app, ejecting, and copy-pasting the relevant changes in the config and scripts into my ejected project.
^^ works fine for ejected apps
Issue Analytics
- State:
- Created 4 years ago
- Reactions:59
- Comments:27 (1 by maintainers)
Top GitHub Comments
I soved that upgrading
"react-scripts"
from"3.3.0"
to"^3.4.0"
I have exact same issue after re-installing my dependencies.
I tried, deleting my
node_modules
and re-installing but no luck…Please, how can I resolve this issue? I am using
create-react-app
and I have notejected
yet.Edit Fixed the issue for me: https://stackoverflow.com/a/60242323/3532661