Skip to content

npm run build fails to generate bundle #1026

Closed

Description

@AJShippify

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?

Many errors, especially related to "missing modules", are due to npm bugs.

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?

Description

Build script is not loading forever in an Ubuntu 14.04 server

Expected behavior

Generate build folder in a limited time

Actual behavior

Script runs for more than 40 minutes then times out only leaving a build folder with favicon.ico

Environment

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

  1. npm ls react-scripts (if you haven’t ejected): 0.7.0
  2. node -v: v6.8.1
  3. npm -v: 3.10.9

Then, specify:

  1. Operating system: Ubuntu 14.04
  2. Browser and version: No browser (just build)

Reproducible Demo

Base create-react-app

Activity

  1. gaearon commented on Nov 20, 2016

    @gaearon
    Contributor

    Thanks for the report. Unfortunately I'll have to close it because there is not enough information here to diagnose the error, and your best bet is to try to debug the process yourself and figure out what is happening. I'd be happy to reopen if you have any suggestions about what might be happening, or if there are more people experiencing the issue. Since nobody else reports anything like this, it seems like it's some isolated issue with your machine, and even though I'm really sorry this is happening, there is nothing I could do to help.

  2. andyengle commented on Nov 30, 2016

    @andyengle

    Hi @AJShippify, not sure you're still having this problem, but it seems I'm running into the same issue when building my app on my Linux box, which is a cloud instance running CentOS 6.5. Anyway, I found that my builds would run briefly, then just stop for no reason. I had a look at the build.js script in node_modules/react-scripts/ and was able to track down the config details, and the build.js file. From there I added the CaseSensitivePathsPlugin to watch WebPack load up all the modules, and I found that loading stopped when it got to node_modules/core-js/library/modules. At that point, everything stopped but no error was provided as to why loading failed.

    Do you (or anyone else reading this) know of a way to get WebPack to throw some sort of error when it fails to load something or to otherwise make it more obvious why loading failed?

    Hope that all helps, or at least provides some clue as to why our builds are failing on Linux. Thanks!

  3. AJShippify commented on Nov 30, 2016

    @AJShippify
    Author
  4. gaearon commented on Dec 1, 2016

    @gaearon
    Contributor

    Thanks for sharing the details!

  5. andyengle commented on Dec 1, 2016

    @andyengle

    Agreed. Thanks for the clues, @AJShippify. I tried my build on another cloud instance with a lot more memory and things worked swimmingly. In this case, it was an EC2 instance sized at m4.large (16GB memory) which did the trick.

  6. AJShippify commented on Dec 1, 2016

    @AJShippify
    Author
  7. locked and limited conversation to collaborators on Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions