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
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
Describe the bug
When running
react-scripts build
the build fails if:scripts
on itspackage.json
AND"homepage"
onpackage.json
or thePUBLIC_URL
env variable) AND.github.io/
This might happen if one is using yarn workspaces and all scripts of the React application are declared on the workspace root package.
It seems that the problem lies on
printHostingInstructions.js
, as it tries to accessdeploy
ofscripts
without checking ifscripts
exists first.create-react-app/packages/react-dev-utils/printHostingInstructions.js
Line 25 in 915108b
Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
Environment
Steps to reproduce
yarn
PUBLIC_URL=http://any.thing yarn build
OR
yarn
PUBLIC_URL=http://renato-bohler.github.io/my-app yarn build
Expected behavior
Build shouldn't fail.
Actual behavior
Build is failing with the message:
Note that without setting
PUBLIC_URL
, the problem doesn't occur:Reproducible demo
cra-build-issue, as mentioned on "Steps to reproduce", or create-react-app itself.
The text was updated successfully, but these errors were encountered: