question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed at the cotd@0.0.1 build script 'react-scripts build'.

See original GitHub issue

If you are reporting a bug, please fill in below. Otherwise feel free to remove this template entirely.

Can you reproduce the problem with latest npm?

Yes. Used npm 4.2.0 Many errors, especially related to “missing modules”, are due to npm bugs. Not the issue(s) If you’re using Windows, follow these instructions to update npm.

If you’re using OS X or Linux, run this to update npm:

npm install -g npm@latest

cd your_project_directory
rm -rf node_modules
npm install

Then try to reproduce the issue again.

Can you still reproduce it? Yes.

Description

What are you reporting? Build fail

Expected behavior

Create a new build of my react app Tell us what you think should happen.

Actual behavior

Tell us what actually happens.

Environment

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

  1. npm ls react-scripts (if you haven’t ejected): cotd@0.0.1 /Users/mariacam/Development/react-for-beginners/catch-of-the-day └── react-scripts@0.6.1 invalid
  2. node -v: 7.8.0
  3. npm -v: 4.2.0

Then, specify:

  1. Operating system: OSX 10.11.6
  2. Browser and version: Chrome Version 57.0.2987.98 (64-bit)

Reproducible Demo

Please take the time to create a new app that reproduces the issue.

Alternatively, you could copy your app that experiences the problem and start removing things until you’re left with the minimal reproducible demo.

(Accidentally, you might get to the root of your problem during that process.)

Push to GitHub and paste the link here. https://github.com/interglobalmedia/react-for-beginners By doing this, you’re helping the Create React App contributors a big time! Demonstrable issues gets fixed faster.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

20reactions
gaearoncommented, Apr 3, 2017

If you’re curious how I diagnosed the issue, from the stack trace it seemed like it has to do with CSS. I removed the CSS import to verify that it fixes the build, and it did. Then I included it again, and it broke. Then I commented out half of CSS, and it was still broken. I commented out half of what’s left, and it was still broken. I kept commenting out half of what’s left until I commented out the broken rules. This fixed the issue. Then I verified that commenting out those broken rules alone was also enough to fix the issue. Finally, I looked at the rules and noticed they are invalid. Hope this helps!

(I wish PostCSS parser gave a better message in this case. I’m not sure whether it’s worth reporting or not, maybe @ai can tell.)

3reactions
gaearoncommented, Apr 3, 2017

Feel free to file more issues if you bump into something, we’re happy to help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm ERR! reminder@0.1.0 build: `CI= react-scripts build`
I want to deploy it to netlify. To deploy it on netlify, I need to build it first. But when I run npm...
Read more >
Everything you need to know about react-scripts
In this guide, we'll give an overview of react-scripts, compare a few different types of scripts, and describe how Create React App ...
Read more >
heroku build error “Failed at the client@0.1.0 build script”
I am trying to deploy my react app with server to heroku. Everything works on localhost but when I deploy my app to...
Read more >
How to fix build failures with `create-react-app` in production
If your build is using create-react-app and has been failing since approximately the 18th of June 2020, this post will help you fix...
Read more >
Yarn Build not recognizing 'PUBLIC_URL' - WordPress.org
search@0.1.0 build: <code>PUBLIC_URL=/wp-content/reactpress/apps/search/build react-scripts build</code> npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found