Closed or4kool closed 6 years ago
Hi @or4kool 😄
Based on that build log, I suspect the package.json contains a "heroku-postbuild"
entry. That's probably what's breaking the build.
When using this create-react-app-buildpack, all of the build is preset. Please try deleting that "heroku-postbuild"
entry.
Hello, please I have issues with the create-react-app buildpack. Keep getting npm ERR! missing script: build
this is my heroku push message:
remote: Compressing source files... done. remote: Building source: remote: remote: -----> React.js (create-react-app) multi app detected remote: -----> Configure create-react-app build environment remote: Using
NODE_ENV=development
remote: =====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-multi.git remote: =====> Detected Framework: Multipack remote: =====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git remote: =====> Detected Framework: Node.js remote: remote: -----> Creating runtime environment remote: remote: NPM_CONFIG_LOGLEVEL=error remote: NPM_CONFIG_PRODUCTION=false remote: NODE_VERBOSE=false remote: NODE_ENV=development remote: NODE_MODULES_CACHE=true remote: remote: -----> Installing binaries remote: engines.node (package.json): unspecified remote: engines.npm (package.json): unspecified (use default) remote: remote: Resolving node version 8.x... remote: Downloading and installing node 8.11.3... remote: Using default npm version: 5.6.0 remote: remote: -----> Restoring cache remote: Loading 2 from cacheDirectories (default): remote: - node_modules remote: - bower_components (not cached - skipping) remote: remote: -----> Building dependencies remote: Installing node modules (package.json + package-lock) remote: up to date in 2.242s remote: Running heroku-postbuild remote: remote: > backend@0.0.0 heroku-postbuild /tmp/build_77c5319211541e3cfbdca57b4fe85d5b remote: > cd newc && npm install && npm run build remote: remote: remote: > uglifyjs-webpack-plugin@0.4.6 postinstall /tmp/build_77c5319211541e3cfbdca57b4fe85d5b/newc/node_modules/uglifyjs-webpack-plugin remote: > node lib/post_install.js remote: remote: added 1326 packages in 32.131s remote: remote: > newc@0.1.0 build /tmp/build_77c5319211541e3cfbdca57b4fe85d5b/newc remote: > react-scripts build remote: remote: Creating an optimized production build... remote: Compiled with warnings. remote: remote: ./src/index.js remote: Line 4: 'App' is defined but never used no-unused-vars remote: remote: Search for the keywords to learn more about each warning. remote: To ignore, add // eslint-disable-next-line to the line before. remote: remote: File sizes after gzip: remote: remote: 47.52 KB build/static/js/main.0950b1a5.js remote: 299 B build/static/css/main.c17080f1.css remote: remote: The project was built assuming it is hosted at the server root. remote: You can control this with the homepage field in your package.json. remote: For example, add this to build it for GitHub Pages: remote: remote: "homepage" : "http://myname.github.io/myapp", remote: remote: The build folder is ready to be deployed. remote: You may serve it with a static server: remote: remote: npm install -g serve remote: serve -s build remote: remote: Find out more about deployment here: remote: remote: http://bit.ly/2vY88Kr remote: remote: remote: -----> Caching build remote: Clearing previous node cache remote: Saving 2 cacheDirectories (default): remote: - node_modules remote: - bower_components (nothing to cache) remote: remote: -----> Pruning devDependencies remote: Skipping because NODE_ENV is not 'production' remote: remote: -----> Build succeeded! remote: =====> Downloading Buildpack: https://github.com/mars/create-react-app-inner-buildpack.git remote: =====> Detected Framework: React.js (create-react-app) remote: Writingstatic.json
to support create-react-app remote: Enabling runtime environment variables remote: npm ERR! missing script: build remote: remote: npm ERR! A complete log of this run can be found in: remote: npm ERR! /app/.npm/_logs/2018-07-31T11_32_05_086Z-debug.log remote: ! Push rejected, failed to compile React.js (create-react-app) multi app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to peaceful-falls-83083. remote: To https://git.heroku.com/peaceful-falls-83083.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/peaceful-falls-83083.git'