Skip to content

react-scripts: not found while pushing to heroku #14

@McZieuwa

Description

@McZieuwa

Hi, please whenever i try to push to heroku using : git push heroku master, I get this error.

Counting objects: 12, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (12/12), 31.45 KiB | 0 bytes/s, done.
Total 12 (delta 8), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NPM_CONFIG_PRODUCTION=true
remote: NODE_VERBOSE=false
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): 9.4.0
remote: engines.npm (package.json): 5.6.0
remote:
remote: Resolving node version 9.4.0...
remote: Downloading and installing node 9.4.0...
remote: npm 5.6.0 already installed with node
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: added 17 packages in 2.327s
remote: Running heroku-postbuild
remote:
remote: > scholarlyft@1.0.0 heroku-postbuild /tmp/build_29056fffc5fdcc0026d532b01dc8bfad
remote: > NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client
remote:
remote: added 18 packages in 3.537s
remote:
remote: > client@0.1.0 build /tmp/build_29056fffc5fdcc0026d532b01dc8bfad/client
remote: > react-scripts build
remote:
remote: sh: 1: react-scripts: not found
remote: npm ERR! file sh
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno ENOENT
remote: npm ERR! syscall spawn
remote: npm ERR! client@0.1.0 build: react-scripts build
remote: npm ERR! spawn ENOENT
remote: npm ERR!
remote: npm ERR! Failed at the client@0.1.0 build script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /app/.npm/_logs/2018-01-21T00_28_13_886Z-debug.log
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! scholarlyft@1.0.0 heroku-postbuild: NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the scholarlyft@1.0.0 heroku-postbuild script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /app/.npm/_logs/2018-01-21T00_28_13_900Z-debug.log
remote:
remote: -----> Build failed
remote:
remote: We're sorry this build is failing! You can troubleshoot common issues here:
remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote: If you're stuck, please submit a ticket so we can help:
remote: https://help.heroku.com/
remote:
remote: Love,
remote: Heroku
remote:
remote: ! Push rejected, failed to compile Node.js app.
remote:
remote: ! Push failed
.

here is my package.json file:

{
"name": "scholarlyft",
"version": "1.0.0",
"description": "An educational website",
"main": "index.js",
"engines": {
"node": "9.4.0",
"npm": "5.6.0"
},
"scripts": {
"start": "node index.js",
"server": "nodemon index.js",
"client": "npm run start --prefix client",
"dev": "concurrently "npm run server" "npm run client"",
"heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client"
},
"author": "Edward Alozieuwa",
"license": "ISC",
"dependencies": {
"concurrently": "^3.5.1",
"express": "^4.16.2"
},
"devDependencies": {
"nodemon": "^1.14.11"
}
}

Please help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions