Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot deploy on heroku #122

Open
caitlin05 opened this issue Jan 28, 2020 · 11 comments
Open

cannot deploy on heroku #122

caitlin05 opened this issue Jan 28, 2020 · 11 comments

Comments

@caitlin05
Copy link

how do I set the sdk location( heroku git) on the nodeJS app file?
I have set the node-rfc as a dependency
{ "name": "testDep", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "node app.js" }, "engines": { "node": "10.x" }, "dependencies": { "node-rfc": "^1.0.3" }, "keywords": [], "author": "", "license": "ISC" }
git push heroku master is always failing

@fredimartins
Copy link
Contributor

You need SAP NW RFC SDK as described in Readme and follow the install instructions.
You need adapt the instructions for heroku.
http://sap.github.io/node-rfc/install.html#sap-nw-rfc-library-installation
https://support.sap.com/en/product/connectors/nwrfcsdk.html

@caitlin05
Copy link
Author

I already have the SDK, I already have it in my Heroku Git, but build always fails because of the node-rfc installation.

@bsrdjan
Copy link
Member

bsrdjan commented Feb 5, 2020

Could you please post the error message?

@caitlin05
Copy link
Author

Please see build log below

-----> Node.js app detected
       
-----> Creating runtime environment
       
       NPM_CONFIG_LOGLEVEL=error
       NODE_ENV=production
       NODE_MODULES_CACHE=true
       NODE_VERBOSE=false
       
-----> Installing binaries
       engines.node (package.json):  10.x
       engines.npm (package.json):   unspecified (use default)
       
       Resolving node version 10.x...
       Downloading and installing node 10.18.1...
       Using default npm version: 6.13.4
       
-----> Restoring cache
       - node_modules (not cached - skipping)
       
-----> Installing dependencies
       Installing node modules (package.json + package-lock)
       
       > node-rfc@1.0.3 preinstall /tmp/build_3b979f50852adc2bff3c74e45278ad15/node_modules/node-rfc
       > npm install cmake-js prebuild-install prebuild node-addon-api
       
       + node-addon-api@1.7.1
       + prebuild-install@5.3.3
       + prebuild@9.1.1
       + cmake-js@5.3.2
       added 1 package from 44 contributors and audited 1205 packages in 14.027s
       found 0 vulnerabilities
       
       
       > node-rfc@1.0.3 install /tmp/build_3b979f50852adc2bff3c74e45278ad15/node_modules/node-rfc
       > prebuild-install --tag-prefix -r napi || npm run prebuild
       
       sh: 1: prebuild-install: not found
       
       > node-rfc@1.0.3 prebuild /tmp/build_3b979f50852adc2bff3c74e45278ad15/node_modules/node-rfc
       > prebuild --backend cmake-js -r napi --force --strip --verbose --tag-prefix
       
       sh: 1: prebuild: not found
       npm ERR! code ELIFECYCLE
       npm ERR! syscall spawn
       npm ERR! file sh
       npm ERR! errno ENOENT
       npm ERR! node-rfc@1.0.3 prebuild: `prebuild --backend cmake-js -r napi --force --strip --verbose --tag-prefix`
       npm ERR! spawn ENOENT
       npm ERR! 
       npm ERR! Failed at the node-rfc@1.0.3 prebuild script.
       npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
       
       npm ERR! A complete log of this run can be found in:
       npm ERR!     /tmp/npmcache.LqLZV/_logs/2020-01-28T13_40_22_061Z-debug.log
       npm ERR! code ELIFECYCLE
       npm ERR! errno 1
       npm ERR! node-rfc@1.0.3 install: `prebuild-install --tag-prefix -r napi || npm run prebuild`
       npm ERR! Exit status 1
       npm ERR! 
       npm ERR! Failed at the node-rfc@1.0.3 install script.
       npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
       
       npm ERR! A complete log of this run can be found in:
       npm ERR!     /tmp/npmcache.LqLZV/_logs/2020-01-28T13_40_22_146Z-debug.log
-----> Build failed
       
       We're sorry this build is failing! You can troubleshoot common issues here:
       https://devcenter.heroku.com/articles/troubleshooting-node-deploys
       
       If you're stuck, please submit a ticket so we can help:
       https://help.heroku.com/
       
       Love,
       Heroku
       
 !     Push rejected, failed to compile Node.js app.
 !     Push failed

@fredimartins
Copy link
Contributor

it seems to be a linux version, when i tried to make a docker image with alpine i received the same error, debian and ubuntu works well.
In This case, the npm install prebuild-install but it can not be seen when a build starts.

@caitlin05
Copy link
Author

caitlin05 commented Feb 5, 2020

sorry but im not familiar with that. did you mean to say that heroku is linux-based?
does this mean that it won't work on linux?

@bsrdjan
Copy link
Member

bsrdjan commented Mar 2, 2020

prebuild requires locally installed CMake. Is CMake installed on docker/heroku?

Where the ABAP backend system should be installed, to be reached from Heroku?

@Siva1963
Copy link

Siva1963 commented Apr 9, 2020

Hi @bsrdjan getting below error when passing NODE_ENV=production

[0m[4/4] Building fresh packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[91merror /root/app/node_modules/node-rfc: Command failed.
Exit code: 1
Command: prebuild-install --tag-prefix -r napi || npm run prebuild
Arguments: 
Directory: /root/app/node_modules/node-rfc
Output:
/bin/sh: 1: prebuild-install: not found
npm WARN lifecycle The node binary used for scripts is /tmp/yarn--1586444958998-0.7247393224243084/node but npm is using /usr/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
> node-rfc@1.0.6 prebuild /root/app/node_modules/node-rfc
> prebuild --backend cmake-js -r napi --force --strip --verbose --tag-prefix
sh: 1: prebuild: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! node-rfc@1.0.6 prebuild: `prebuild --backend cmake-js -r napi --force --strip --verbose --tag-prefix`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the node-rfc@1.0.6 prebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-04-09T15_09_28_184Z-debug.log
[0mMakefile:7: recipe for target 'bootstrap' failed
[91mmake: *** [bootstrap] Error 1
[0mThe command '/bin/sh -c make bootstrap' returned a non-zero code: 2
[Pipeline] }

Node version used - 10.19.0

This happens only in production in other env's it works fine

@bsrdjan
Copy link
Member

bsrdjan commented Apr 13, 2020

Reproduced on Windows and found no NODE_ENV related issues for prebuild. Let see if any feedback on issue posted there.

@bsrdjan
Copy link
Member

bsrdjan commented Nov 3, 2020

The feature request to enable SAP NWRFC SDK usage on heroku, in Connectivity context, can be created for:

Security Services category of the SAP Cloud Platform – Platform Foundation

@bsrdjan bsrdjan reopened this Nov 3, 2020
@bsrdjan
Copy link
Member

bsrdjan commented Feb 18, 2021

You may vote for the new request, linked here: #145 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants