Create-react-app: Development build fails after upgrading to react-scripts 0.8.2

Created on 8 Dec 2016  Â·  12Comments  Â·  Source: facebook/create-react-app

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.

bug underlying tools

Most helpful comment

😱

All 12 comments

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

Thanks for reporting.

I sent a fix in https://github.com/waysact/webpack-subresource-integrity/pull/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?

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.

@gaearon Thank you for the fix!

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

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

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

Please keep up with reports if anything is broken!

Will do!

😱

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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adrice727 picture adrice727  Â·  3Comments

Aranir picture Aranir  Â·  3Comments

oltsa picture oltsa  Â·  3Comments

rdamian3 picture rdamian3  Â·  3Comments

alleroux picture alleroux  Â·  3Comments