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

npm run build fails to generate bundle #1026

Closed
AJShippify opened this issue Nov 9, 2016 · 6 comments
Closed

npm run build fails to generate bundle #1026

AJShippify opened this issue Nov 9, 2016 · 6 comments

Comments

@AJShippify
Copy link

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

@gaearon
Copy link
Contributor

gaearon commented Nov 20, 2016

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.

@gaearon gaearon closed this as completed Nov 20, 2016
@andyengle
Copy link

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!

@AJShippify
Copy link
Author

AJShippify commented Nov 30, 2016 via email

@gaearon
Copy link
Contributor

gaearon commented Dec 1, 2016

Thanks for sharing the details!

@andyengle
Copy link

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.

@AJShippify
Copy link
Author

AJShippify commented Dec 1, 2016 via email

@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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants