Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #2475
Closed
Open
Issue created Jun 05, 2017 by Administrator@rootContributor

Build Error - Static Resource Size too Large

Created by: axejintao

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? Yes!

Description

What are you reporting? Building create-react-app with snoowrap package results in a build error.

Expected behavior

Tell us what you think should happen.

The module should build and push to heroku to allow me to deploy my website.

Actual behavior

Tell us what actually happens.

I have two different set ups, one with the site, one with only create-react app and snoowrap.

Website Error:

remote: Creating an optimized production build...
remote: Skipping static resource "/tmp/build_8c164f80abe3d0afee2a5abb6d43ec77/build/static/js/main.e6b3427a.js" (2.42 MB) - max size is 2.1 MB
remote: Failed to compile.
remote: 
remote: static/js/main.e6b3427a.js from UglifyJs
remote: Unexpected token: punc ([) [./~/snoowrap/dist/helpers.js:151,55][static/js/main.e6b3427a.js:1637,56]
remote: 
remote: 
remote: npm ERR! Linux 3.13.0-112-generic
remote: npm ERR! argv "/tmp/build_8c164f80abe3d0afee2a5abb6d43ec77/.heroku/node/bin/node" "/tmp/build_8c164f80abe3d0afee2a5abb6d43ec77/.heroku/node/bin/npm" "run" "build"
remote: npm ERR! node v6.10.3
remote: npm ERR! npm  v3.10.10
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! cdv-site@0.1.0 build: `react-scripts build`
remote: npm ERR! Exit status 1
remote: npm ERR! 

create-react-app & snoowrap only:

remote: Creating an optimized production build...
remote: Failed to compile.
remote: 
remote: static/js/main.4dec7976.js from UglifyJs
remote: Unexpected token: punc ([) [./~/snoowrap/dist/helpers.js:151,55][static/js/main.4dec7976.js:823,56]
remote: 
remote: 
remote: npm ERR! Linux 3.13.0-112-generic
remote: npm ERR! argv "/tmp/build_b9c89a800c56a30e1c98bfa4ffeb83d3/.heroku/node/bin/node" "/tmp/build_b9c89a800c56a30e1c98bfa4ffeb83d3/.heroku/node/bin/npm" "run" "build"
remote: npm ERR! node v6.10.3
remote: npm ERR! npm  v3.10.10
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! build-fail-demo@0.1.0 build: `react-scripts build`
remote: npm ERR! Exit status 1
remote: npm ERR! 

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@1.0.7
  2. node -v: v7.10.0
  3. npm -v: 5.0.2

Then, specify:

  1. Operating system: Mac OSX Sierra 10.12.5
  2. Browser and version: Chrome Version 58.0.3029.110 (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. Website: https://github.com/cdvallejo/cdv-site Basic Example: https://github.com/cdvallejo/build-error

By doing this, you're helping the Create React App contributors a big time! Demonstrable issues gets fixed faster.

Assignee
Assign to
Time tracking