Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development build fails after upgrading to react-scripts 0.8.2 #1202

Closed
AlmeroSteyn opened this issue Dec 8, 2016 · 12 comments
Closed

Development build fails after upgrading to react-scripts 0.8.2 #1202

AlmeroSteyn opened this issue Dec 8, 2016 · 12 comments

Comments

@AlmeroSteyn
Copy link
Contributor

Description

After upgrading to the latest version of create-react-app and react-scripts (0.8.2) the build task fails.

Expected behavior

Build should pass on a newly created app, or updating an existing app to react-scripts v0.8.2

Actual behavior

In both a newly created app or in an existing app upgraded, the build fails:

image

Downgrading both scenarios back to v0.8.1 makes the build complete successfully again.

Environment

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (if you haven’t ejected): react-scripts:@0.8.2
  2. node -v: v6.7.0
  3. npm -v:3.10.8

However I am using Yarn v0.17.10 for all actions.

Then, specify:

  1. Operating system: Windows 8
  2. Browser and version: Fails in command console, so not applicable

Reproducible Demo

To reproduce create a new app and run yarn build.

@robcaldecott
Copy link

Exactly the same here on Windows 7 x64 using npm. Rolling back to 0.8.1 for now.

@gaearon
Copy link
Contributor

gaearon commented Dec 8, 2016

Thanks for reporting.

I sent a fix in waysact/webpack-subresource-integrity#23, will see how fast it gets merged.

If it doesn't get merged today I'll have to revert the addition of https://github.com/waysact/webpack-subresource-integrity until it's more stable.

cc @jscheid — could you help getting it in asap please?

@gaearon
Copy link
Contributor

gaearon commented Dec 8, 2016

In the meantime you can fix this locally by applying this change inside node_modules/webpack-subresource-integrity/index.js or (if it doesn't exist) node_modules/react-scripts/node_modules/webpack-subresource-integrity/index.js. The line numbers are slightly different because we use a previous version but you just need to find SubresourceIntegrityPlugin.prototype.hwpAssetPath in the file and replace its contents.

@AlmeroSteyn
Copy link
Contributor Author

@gaearon Thank you for the fix!

@gaearon
Copy link
Contributor

gaearon commented Dec 8, 2016

Sorry about that. We need to start doing Windows CI builds..

@gaearon
Copy link
Contributor

gaearon commented Dec 8, 2016

This should be fixed in 0.8.3 which was just released.
Please verify.

https://github.com/facebookincubator/create-react-app/releases/tag/v0.8.3

@AlmeroSteyn
Copy link
Contributor Author

0.8.3 works for me. Thank you for the super fast fix!

@gaearon
Copy link
Contributor

gaearon commented Dec 8, 2016

Please keep up with reports if anything is broken!

@AlmeroSteyn
Copy link
Contributor Author

Will do!

@XVincentX
Copy link

😱

@BrunoQuaresma
Copy link

It works but, when i put the files on server (shared or in Heroku) and access in my mobile phone this error appears:

Failed to find a valid digest in the 'integrity' attribute for resource 'http://facilbardelivery.com.br/static/css/main.33fa5f7d.css' with computed SHA-256 integrity 'fhBe+EZQ6zPH/PQFiIlVZjwvoWQGAWe1s8BEyp2TJ6k='. The resource has been blocked.

@gaearon
Copy link
Contributor

gaearon commented Dec 10, 2016

Does this help?
Are you modifying files before deployment somehow?

@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants