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.

npm run build fails to generate bundle

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?

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

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
AJShippifycommented, Nov 30, 2016

What was happening, in my situation, is that since I was working in a low-memory environment the build script silently failed due to running out of available memory.

2016-11-29 23:48 GMT-05:00 Andy Engle notifications@github.com:

Hi @AJShippify https://github.com/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!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/facebookincubator/create-react-app/issues/1026#issuecomment-263782211, or mute the thread https://github.com/notifications/unsubscribe-auth/ANbg5O1V1ihqyGB-Y_r1rAJ6XHFZ-FELks5rDQAJgaJpZM4KtrOH .

0reactions
AJShippifycommented, Dec 1, 2016

No problem, glad to help 👍

2016-12-01 10:07 GMT-05:00 Andy Engle notifications@github.com:

Agreed. Thanks for the clues, @AJShippify https://github.com/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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/facebookincubator/create-react-app/issues/1026#issuecomment-264197075, or mute the thread https://github.com/notifications/unsubscribe-auth/ANbg5HFivYkNXwUUL6fMTHOe71WL17Psks5rDuLHgaJpZM4KtrOH .

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm run build > bundle.js not getting created - Stack Overflow
You're setting path to '/' which is relative to your systems file structure. You're likely generating the bundle file in your home directory ......
Read more >
start-dev-faster - npm
npm run build. Builds the app for production to the build folder. It correctly bundles React in production mode and optimizes the build...
Read more >
npm run build does not minify bundles #9458 | Support Center
As you can see below, "npm run build" executes correctly with no errors, but the created bundles are identical to the dev versions...
Read more >
Npm run build failing on MAC M1 - Questions - n8n community
npm run build failing with below error ERROR Failed to compile with 9 errors I am following this document to get n8n locally...
Read more >
The build, bundle and cache commands - npm - w3resource
The npm-bundle command has been removed. Npm removed the command as from v1.0, the reason behind the removal is that the default behavior...
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