Closed kenaitian closed 4 years ago
Hi @kenaitian
This error seems to be for the Node.js buildpack.
Hi @kenaitian
This error seems to be for the Node.js buildpack.
Still no fixes even after troubleshooting to no end
Are you using the heroku-buildpack-r
?
The error suggests it's to do with one of your node packages; nothing to do with R or this buildpack,
remote: > NPM_CONFIG_PRODUCTION=false "npm install --prefix client" "npm run build --prefix client"
remote:
remote: sh: 1: npm install --prefix client: not found
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! syscall spawn
remote: npm ERR! file sh
remote: npm ERR! errno ENOENT
I'm not a node developer, but I noticed in the log that the error is occurring in the post-build process, so perhaps this error has to do with that script?
Maybe if you provide a bit more info on the configuration you are using I can help.
Hi @kenaitian
Yeah, this definitely isn't an R application or using the heroku-buildpack-r
buildpack.
My guess is Heroku is detecting your package.json
file and activating the Node.js buildpack when you deploy the application.
It would appear that this application is a static web application and uses the cloudfoundry/staticfile-buildpack buildpack.
You can configure your Heroku application to use staticfile-buildpack
with the following command (from the application root directory):
heroku buildpacks:set https://github.com/cloudfoundry/staticfile-buildpack
Sorry I can't be of more help.
Hi @kenaitian
Yeah, this definitely isn't an R application or using the
heroku-buildpack-r
buildpack.My guess is Heroku is detecting your
package.json
file and activating the Node.js buildpack when you deploy the application.It would appear that this application is a static web application and uses the cloudfoundry/staticfile-buildpack buildpack.
You can configure your Heroku application to use
staticfile-buildpack
with the following command (from the application root directory):heroku buildpacks:set https://github.com/cloudfoundry/staticfile-buildpack
Sorry I can't be of more help.
That Heroku command wouldn’t help provided that the manifest.yml with “buildback: -staticfile_buildpack” is required by Cloud Foundry (CF) hosted on the IBM Cloud; however, Heroku requires Procfile with “web: node server.js” and “Heroku buildpacks” are already set. In other words, the manifest.yml is only there for when I’d need to deploy to the CF on the IBM Cloud. I think the error comes up where it says “Detected both ‘build’ and ‘Heroku-postbuild’ scripts” while deploying a React app alongside a server to Heroku.
PS C:\Users\IT\source\repos\projects\covid19-medres> git push heroku master » Warning: heroku update available from 7.41.1 to 7.42.5. Setting BUILDPACK_DEBUG and restarting ⬢ covid19-medres... done, v6 BUILDPACK_DEBUG: 1 PS C:\Users\IT\source\repos\projects\covid19-medres> git push heroku master
Enumerating objects: 2070, done. Counting objects: 100% (2070/2070), done. Delta compression using up to 4 threads Compressing objects: 100% (899/899), done. Writing objects: 100% (2070/2070), 5.45 MiB | 9.83 MiB/s, done. Total 2070 (delta 1126), reused 2000 (delta 1084) 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: NODE_ENV=production remote: NODE_MODULES_CACHE=true remote: NODE_VERBOSE=false remote: remote: -----> Installing binaries remote: engines.node (package.json): 10.15.2 remote: engines.npm (package.json): 6.14.4 remote: remote: Resolving node version 10.15.2... remote: Downloading and installing node 10.15.2 remote: Bootstrapping npm 6.14.4 (replacing 6.4.1)... remote: npm 6.14.4 installed remote:
remote: -----> Installing dependencies remote: Installing node modules remote:
remote: > core-js@3.6.5 postinstall /tmp/build_fb4cc7f7/node_modules/core-js
remote: > node -e "try{require('./postinstall')}catch(e){}" remote: remote:
remote: > fsevents@1.2.13 install /tmp/build_fb4cc7f7/node_modules/fsevents
remote: > node install.js remote: remote:
remote: Skipping 'fsevents' build as platform linux is not supported remote:
remote: > ibm_db@2.7.0 install /tmp/build_fb4cc7f7/node_modules/ibm_db remote: > node installer/driverInstall.js remote: remote: platform = linux , arch = x64 , node.js version = v10.15.2 remote: make version = GNU Make 4.1 remote: Downloading DB2 ODBC CLI Driver from https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/linuxx64_odbc_cli.tar.gz... remote: remote: 53.79 remote: **** remote: You are downloading a package which includes the Node.js module for IBM DB2/Informix. The module is licensed under the Apache License 2.0. The package also includes IBM ODBC and CLI Driver from IBM, which is automatically downloaded as the node module is installed on your system/device. The license agreement to the IBM ODBC and CLI Driver is available in undefined Check for additional dependencies, which may come with their own license agreement(s). Your use of the components of the package and dependencies constitutes your acceptance of their respective license agreements. If you do not accept the terms of any license agreement(s), then delete the relevant component(s) from your device. remote: **** remote: remote: Downloading and extraction of DB2 ODBC CLI Driver completed successfully ... remote: remote: make: Entering directory '/tmp/build_fb4cc7f7/node_modules/ibm_db/build'
remote: CXX(target) Release/obj.target/odbc_bindings/src/odbc.o remote: CXX(target) Release/obj.target/odbc_bindings/src/odbc_connection.o
remote: CXX(target) Release/obj.target/odbc_bindings/src/odbc_statement.o
remote: CXX(target) Release/obj.target/odbc_bindings/src/odbc_result.o remote: SOLINK_MODULE(target) Release/obj.target/odbc_bindings.node remote: COPY Release/odbc_bindings.node remote: make: Leaving directory '/tmp/build_fb4cc7f7/node_modules/ibm_db/build'
remote: remote: remote: > nodemon@2.0.4 postinstall /tmp/build_fb4cc7f7/node_modules/nodemon
remote: > node bin/postinstall || exit 0 remote: remote: Love nodemon? You can now support the project via the open collective:
remote: > https://opencollective.com/nodemon/donate remote: remote: added 1425 packages in 34.051s remote: remote: -----> Build remote: Detected both "build" and "heroku-postbuild" scripts remote: Running heroku-postbuild remote:
remote: > covid19medres@1.0.0 heroku-postbuild /tmp/build_fb4cc7f7 remote: > NPM_CONFIG_PRODUCTION=false "npm install --prefix client" "npm run build --prefix client" remote: remote: sh: 1: npm install --prefix client: not found remote: npm ERR! code ELIFECYCLE remote: npm ERR! syscall spawn remote: npm ERR! file sh remote: npm ERR! errno ENOENT remote: npm ERR! covid19medres@1.0.0 heroku-postbuild:
NPM_CONFIG_PRODUCTION=false "npm install --prefix client" "npm run build --prefix client"
remote: npm ERR! spawn ENOENT remote: npm ERR! remote: npm ERR! Failed at the covid19medres@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! /tmp/npmcache.OntZQ/_logs/2020-08-08T07_27_03_635Z-debug.logremote: 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 remote: Verifying deploy... remote: remote: ! Push rejected to covid19-medres. remote: To https://git.heroku.com/covid19-medres.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/covid19-medres.git'