node-qrcode install on heroku - node.js

I got problem to install this package on heroku.
Is there a way to do it ?
I saw it's a problem with canvas module, but i don't know what to do.
This is a log of installation on heroku. I don't know how to get more :
npm ERR! canvas#0.12.1 preinstall: `node-waf configure build`
npm ERR! `sh "-c" "node-waf configure build"` failed with 1
npm ERR!
npm ERR! Failed at the canvas#0.12.1 preinstall script.
npm ERR! This is most likely a problem with the canvas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls canvas
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-343-ec2
npm ERR! command "/tmp/node-node-La1F/bin/node" "/tmp/node-npm-6Xts/cli.js" "install" "--production"
npm ERR! cwd /tmp/build_3ejt8evom1p0g
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.41
npm ERR! code ELIFECYCLE
npm ERR! stack Error: canvas#0.12.1 preinstall: `node-waf configure build`
npm ERR! stack `sh "-c" "node-waf configure build"` failed with 1
npm ERR! stack at ChildProcess.<anonymous> (/tmp/node-npm-6Xts/lib/utils/exec.js:56:20)
npm ERR! stack at ChildProcess.emit (events.js:70:17)
npm ERR! stack at maybeExit (child_process.js:362:16)
npm ERR! stack at Process.onexit (child_process.js:398:5)

I successfully used this Heroku builpack:
https://elements.heroku.com/buildpacks/mojodna/heroku-buildpack-cairo
But in its README, it tells you to use heroku-buildpack-multi, that's deprecated. What I did was, using Heroku Toolbelt in command line:
heroku buildpacks:set --index 1 https://github.com/mojodna/heroku-buildpack-cairo.git
heroku buildpacks:add heroku/nodejs
And then push to Heroku so it can build packages again.

Related

Error while updating to Meteor 1.4

Recently, Meteor has been upgraded to v1.4, well that's great! Unfortunately for me, I cannot upgrade it and have an error log like this.
While loading package npm-bcrypt#0.8.7:
error: Command failed:
/root/.meteor/packages/meteor-tool/.1.4.0.1oo55z5++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/npm
rebuild --no-bin-links --update-binary
sh: 1: node-gyp: Permission denied
npm ERR! Linux 4.4.0-21-generic
npm ERR! argv
"/root/.meteor/packages/meteor-tool/.1.4.0.1oo55z5++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node"
"/root/.meteor/packages/meteor-tool/.1.4.0.1oo55z5++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/npm"
"rebuild" "--no-bin-links" "--update-binary"
npm ERR! node v4.4.7
npm ERR! npm v3.10.5
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! bcrypt#0.8.7 install: `node-gyp rebuild`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the bcrypt#0.8.7 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs bcrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!
/root/.meteor/packages/npm-bcrypt/.0.8.7.1i1986o++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/.temp-1fwxhnx/npm-debug.log
sh: 1: node-gyp: Permission denied
npm ERR! Linux 4.4.0-21-generic
npm ERR! argv
"/root/.meteor/packages/meteor-tool/.1.4.0.1oo55z5++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node"
"/root/.meteor/packages/meteor-tool/.1.4.0.1oo55z5++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/npm"
"rebuild" "--no-bin-links" "--update-binary"
npm ERR! node v4.4.7
npm ERR! npm v3.10.5
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! bcrypt#0.8.7 install: `node-gyp rebuild`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the bcrypt#0.8.7 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs bcrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!
/root/.meteor/packages/npm-bcrypt/.0.8.7.1i1986o++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/.temp-1fwxhnx/npm-debug.log
I already tried to uninstall and install node js and npm, I thought it will success but the same error still showed up. Can anyone help me?? thank you
A few different solutions for your issue, depending on platform at:
https://github.com/meteor/meteor/issues/7469#issuecomment-235563857
(Meteor problems are usually easier solved through github issues than Stack Overflow Questions)

TypeError in NPM when using Brunch on Heroku from UglifyMinifier.optimize

I've recently upgraded Brunch and related libraries (e.g., uglify-js-brunch) to 1.7.x. When pushing to Heroku, I get the error pasted below. Any clues on how I can go about fixing this?
Thanks!
-----> Installing dependencies
> xxxx#0.0.1 postinstall /tmp/build_d24a4120-fea7-4048-bddb-66be19b378f0
> brunch build --production
/tmp/build_d24a4120-fea7-4048-bddb-66be19b378f0/node_modules/uglify-js-brunch/lib/index.js:48
data: optimized.code
^
TypeError: Cannot read property 'code' of undefined
at UglifyMinifier.module.exports.UglifyMinifier.optimize (/tmp/build_d24a4120-fea7-4048-bddb-66be19b378f0/node_modules/uglify-js-brunch/lib/index.js:48
:24)
at /tmp/build_d24a4120-fea7-4048-bddb-66be19b378f0/node_modules/brunch/lib/fs_utils/generate.js:220:25
at fn (/tmp/build_d24a4120-fea7-4048-bddb-66be19b378f0/node_modules/brunch/node_modules/async-waterfall/index.js:19:24)
at Object._onImmediate (/tmp/build_d24a4120-fea7-4048-bddb-66be19b378f0/node_modules/brunch/node_modules/async-waterfall/index.js:58:22)
at processImmediate [as _immediateCallback] (timers.js:330:15)
npm ERR! xxxx#0.0.1 postinstall: `brunch build --production`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the xxxx#0.0.1 postinstall script.
npm ERR! This is most likely a problem with the xxxx package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! brunch build --production
npm ERR! You can get their info via:
npm ERR! npm owner ls xxxx
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.8.11-ec2
npm ERR! command "/tmp/build_d24a4120-fea7-4048-bddb-66be19b378f0/vendor/node/bin/node" "/tmp/build_d24a4120-fea7-4048-bddb-66be19b378f0/vendor/node/bin/np
m" "install" "--production"
npm ERR! cwd /tmp/build_d24a4120-fea7-4048-bddb-66be19b378f0
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/build_d24a4120-fea7-4048-bddb-66be19b378f0/npm-debug.log
npm ERR! not ok code 0
This was actually fixed in v1.7.4 of uglify-js-brunch

Build failing on sqlserver driver for nodejs

I'm trying to install node-sqlserver for my application in the node_modules directory by typing the following command,
npm install node-sqlserver
This is what I get,
npm WARN package.json application-name#0.0.1 No README.md file found!
npm WARN package.json node#0.0.0 No README.md file found!
npm http GET https://registry.npmjs.org/node-sqlserver
npm http 304 https://registry.npmjs.org/node-sqlserver
npm WARN deprecated node-sqlserver#0.1.0: This package has been superseded by msnodesql.
> node-sqlserver#0.1.0 install C:\Users\Tarun\Desktop\Songify\node_modules\node-sqlserver
> node-gyp rebuild
C:\Users\Tarun\Desktop\Songify\node_modules\node-sqlserver>node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node
-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! rebuild error Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! rebuild error at failNoPython (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\con
figure.js:85:14)
gyp ERR! rebuild error at Object.oncomplete (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\li
b\configure.js:59:11)
gyp ERR! not ok
npm ERR! node-sqlserver#0.1.0 install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the node-sqlserver#0.1.0 install script.
npm ERR! This is most likely a problem with the node-sqlserver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls node-sqlserver
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\
\npm-cli.js" "install" "node-sqlserver"
npm ERR! cwd C:\Users\Tarun\Desktop\Songify\node_modules
npm ERR! node -v v0.6.20
npm ERR! npm -v 1.1.37
npm ERR! code ELIFECYCLE
npm ERR! message node-sqlserver#0.1.0 install: `node-gyp rebuild`
npm ERR! message `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\Tarun\Desktop\Songify\node_modules\npm-debug.log
npm ERR! not ok code undefined
npm ERR! not ok code 1
How do I resolve this issue? I'm using express as well
Your answer is in the output, you need to install python, following that you will get another error, you will need to install Microsoft SDK for Windows Server 2008 and dot net framework 3.5

How can I install bignum lib for Node.js on Heroku?

I get the following error
-----> Installing dependencies with npm
> bignum#0.5.1 install /tmp/build_1xz3suiyqvjwh/node_modules/bignum
> node-gyp configure build
sh: node-gyp: not found
npm ERR! error installing bignum#0.5.1 Error: bignum#0.5.1 install: `node-gyp configure build`
npm ERR! error installing bignum#0.5.1 `sh "-c" "node-gyp configure build"` failed with 127
npm ERR! error installing bignum#0.5.1 at ChildProcess.<anonymous> (/tmp/node-npm-Pi2L/lib/utils/exec.js:49:20)
npm ERR! error installing bignum#0.5.1 at ChildProcess.emit (events.js:70:17)
npm ERR! error installing bignum#0.5.1 at maybeExit (child_process.js:358:16)
npm ERR! error installing bignum#0.5.1 at Process.onexit (child_process.js:394:5)
npm ERR! bignum#0.5.1 install: `node-gyp configure build`
npm ERR! `sh "-c" "node-gyp configure build"` failed with 127
npm ERR!
npm ERR! Failed at the bignum#0.5.1 install script.
npm ERR! This is most likely a problem with the bignum package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls bignum
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 2.6.32-343-ec2
npm ERR! command "/tmp/node-node-8eWj/bin/node" "/tmp/node-npm-Pi2L/cli.js" "install" "--production"
npm ERR! cwd /tmp/build_1xz3suiyqvjwh
npm ERR! node -v v0.6.20
npm ERR! npm -v 1.0.106
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/build_1xz3suiyqvjwh/npm-debug.log
npm not ok
! Failed to install --production dependencies with npm
! Heroku push rejected, failed to compile Node.js app

Error occurred during node.js deployment (Cloud9 -> Heroku)

1:: Warning: Permanently added 'heroku.com,50.19.85.156' (RSA) to the list of known hosts.
-----> Heroku receiving push
-----> Node.js app detected
-----> Resolving engine versions
Using Node.js version: 0.6.8
Using npm version: 1.1.41
-----> Fetching Node.js binaries
-----> Vendoring node into slug
-----> Installing dependencies with npm
npm WARN package.json cssom#0.2.3 No README.md file found!
npm WARN package.json connect#1.8.5 No README.md file found!
> contextify#0.1.1 install /tmp/build_bofw5mh3ha0z/node_modules/jsdom/node_modules/contextify
> node-gyp rebuild
gyp http GET http://nodejs.org/dist/v0.6.8/node-v0.6.8.tar.gz
gyp http 200 http://nodejs.org/dist/v0.6.8/node-v0.6.8.tar.gz
gyp ERR! UNCAUGHT EXCEPTION Error: UNKNOWN, unknown error '/tmp/build_bofw5mh3ha0z/.node-gyp/0.6.8'
gyp ERR! This is a bug in `node-gyp`, please file an Issue:
gyp ERR! https://github.com/TooTallNate/node-gyp/issues
gyp ERR! not ok
npm ERR! contextify#0.1.1 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 7
npm ERR!
npm ERR! Failed at the contextify#0.1.1 install script.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-343-ec2
npm ERR! command "/tmp/node-node-aT6q/bin/node" "/tmp/node-npm-o7eN/cli.js" "rebuild"
npm ERR! cwd /tmp/build_bofw5mh3ha0z
npm ERR! node -v v0.6.8
npm ERR! npm -v 1.1.41
npm ERR! code ELIFECYCLE
npm ERR! stack Error: contextify#0.1.1 install: `node-gyp rebuild`
npm ERR! stack `sh "-c" "node-gyp rebuild"` failed with 7
npm ERR! stack at ChildProcess.

Resources