meteor-pdf.js
meteor-pdf.js copied to clipboard
Issue with adding package to meteor
When adding package using meteor add "meteor add peerlibrary:pdf.js", its showing errors during installation like below,
=> Errors while adding packages:
While loading package peerlibrary:[email protected]_4:
error: Command failed: /home/user/.meteor/packages/meteor-tool/.1.4.3_1.bowl2a++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/npm
rebuild --update-binary
In file included from ../src/Canvas.h:22:0,
from ../src/Canvas.cc:7:
../../../../canvas/node_modules/nan/nan.h: In function ‘v8::Localv8::Signature NanNew(v8::Handlev8::FunctionTemplate, int,
v8::Handlev8::FunctionTemplate)’:
../../../../canvas/node_modules/nan/nan.h:342:78: error: no matching function for call to ‘v8::Signature::New(v8::Isolate, v8::Handlev8::FunctionTemplate&,
int&, v8::Handlev8::FunctionTemplate&)’
return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
^
../../../../canvas/node_modules/nan/nan.h:342:78: note: candidate is:
In file included from ../src/Canvas.h:11:0,
from ../src/Canvas.cc:7:
/home/user/.node-gyp/4.7.3/include/node/v8.h:4675:27: note: static v8::Localv8::Signature v8::Signature::New(v8::Isolate, v8::Localv8::FunctionTemplate)
static Local<Signature> New(
^
/home/user/.node-gyp/4.7.3/include/node/v8.h:4675:27: note: candidate expects 2 arguments, 4 provided
In file included from ../src/Canvas.h:22:0,
from ../src/Canvas.cc:7:
../../../../canvas/node_modules/nan/nan.h: At global scope:
../../../../canvas/node_modules/nan/nan.h:424:3: error: redefinition of ‘v8::Local<T> NanNew(P) [with T = v8::StringObject; P = v8::Localv8::String]’
NanNew<v8::StringObject, v8::Handlev8::String >(
^
../../../../canvas/node_modules/nan/nan.h:417:3: error: ‘v8::Local<T> NanNew(P) [with T = v8::StringObject; P = v8::Localv8::String]’ previously declared
here
NanNew<v8::StringObject, v8::Localv8::String >(
^
../../../../canvas/node_modules/nan/nan.h:442:36: error: redefinition of ‘template<class T> v8::Localv8::RegExp NanNew(v8::Localv8::String,
v8::RegExp::Flags)’
NAN_INLINE v8::Localv8::RegExp NanNew(
^
../../../../canvas/node_modules/nan/nan.h:436:36: error: ‘template<class T> v8::Localv8::RegExp NanNew(v8::Handlev8::String, v8::RegExp::Flags)’ previously
declared here
NAN_INLINE v8::Localv8::RegExp NanNew(
^
../../../../canvas/node_modules/nan/nan.h:454:36: error: redefinition of ‘template<class T, class P> v8::Localv8::RegExp NanNew(v8::Localv8::String,
v8::RegExp::Flags)’
NAN_INLINE v8::Localv8::RegExp NanNew(
^
../../../../canvas/node_modules/nan/nan.h:448:36: error: ‘template<class T, class P> v8::Localv8::RegExp NanNew(v8::Handlev8::String, v8::RegExp::Flags)’
previously declared here
NAN_INLINE v8::Localv8::RegExp NanNew(
^
../../../../canvas/node_modules/nan/nan.h:623:19: error: ‘NanNew’ declared as an ‘inline’ variable
v8::String::ExternalAsciiStringResource resource) {
^
../../../../canvas/node_modules/nan/nan.h:623:19: warning: ‘always_inline’ attribute ignored [-Wattributes]
../../../../canvas/node_modules/nan/nan.h:623:19: error: ‘v8::Localv8::String NanNew’ redeclared as different kind of symbol
../../../../canvas/node_modules/nan/nan.h:617:36: error: previous declaration of ‘v8::Localv8::String NanNew(v8::String::ExternalStringResource)’
NAN_INLINE v8::Localv8::String NanNew(
^
../../../../canvas/node_modules/nan/nan.h:623:7: error: ‘ExternalAsciiStringResource’ is not a member of ‘v8::String’
v8::String::ExternalAsciiStringResource resource) {
^
../../../../canvas/node_modules/nan/nan.h:623:48: error: ‘resource’ was not declared in this scope
v8::String::ExternalAsciiStringResource resource) {
^
../../../../canvas/node_modules/nan/nan.h:637:27: error: redefinition of ‘template<class T> v8::Local<T> _NanEscapeScopeHelper(v8::Local<T>)’
NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Local<T> val) {
^
../../../../canvas/node_modules/nan/nan.h:632:27: error: ‘template<class T> v8::Local<T> _NanEscapeScopeHelper(v8::Handle<T>)’ previously declared here
NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Handle<T> val) {
^
../../../../canvas/node_modules/nan/nan.h:889:13: error: ‘node::smalloc’ has not been declared
, node::smalloc::FreeCallback callback
^
../../../../canvas/node_modules/nan/nan.h:889:35: error: expected ‘,’ or ‘...’ before ‘callback’
, node::smalloc::FreeCallback callback
^
../../../../canvas/node_modules/nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(char, size_t, int)’:
../../../../canvas/node_modules/nan/nan.h:893:50: error: ‘callback’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../../../../canvas/node_modules/nan/nan.h:893:60: error: ‘hint’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../../../../canvas/node_modules/nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(const char, uint32_t)’:
../../../../canvas/node_modules/nan/nan.h:900:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
../../../../canvas/node_modules/nan/nan.h:900:67: note: candidates are:
In file included from ../../../../canvas/node_modules/nan/nan.h:179:0,
from ../src/Canvas.h:22,
from ../src/Canvas.cc:7:
/home/user/.node-gyp/4.7.3/include/node/node_buffer.h:34:40: note: v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate*, v8::Localv8::String,
node::encoding) make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit
(/home/user/.meteor/packages/meteor-tool/.1.4.3_1.bowl2a++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
gyp ERR! System Linux 4.2.0-42-generic
gyp ERR! command "/home/user/.meteor/packages/meteor-tool/.1.4.3_1.bowl2a++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node"
"/home/user/.meteor/packages/meteor-tool/.1.4.3_1.bowl2a++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild"
gyp ERR! cwd
/home/user/.meteor/packages/peerlibrary_pdf.js/.1.0.791_4.tvdedz++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/.temp-11aime5/node_modules/canvas
gyp ERR! node -v v4.7.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Linux 4.2.0-42-generic
npm ERR! argv "/home/user/.meteor/packages/meteor-tool/.1.4.3_1.bowl2a++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node"
"/home/user/.meteor/packages/meteor-tool/.1.4.3_1.bowl2a++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/npm" "rebuild"
"--update-binary"
npm ERR! node v4.7.3
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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 canvas 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 canvas
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls canvas
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!
/home/user/.meteor/packages/peerlibrary_pdf.js/.1.0.791_4.tvdedz++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/.temp-11aime5/npm-debug.log
In file included from ../src/Canvas.h:22:0,
from ../src/Canvas.cc:7:
../../../../canvas/node_modules/nan/nan.h: In function ‘v8::Localv8::Signature NanNew(v8::Handlev8::FunctionTemplate, int,
v8::Handlev8::FunctionTemplate)’:
../../../../canvas/node_modules/nan/nan.h:342:78: error: no matching function for call to ‘v8::Signature::New(v8::Isolate, v8::Handlev8::FunctionTemplate&,
int&, v8::Handlev8::FunctionTemplate&)’
return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
^
../../../../canvas/node_modules/nan/nan.h:342:78: note: candidate is:
In file included from ../src/Canvas.h:11:0,
from ../src/Canvas.cc:7:
/home/user/.node-gyp/4.7.3/include/node/v8.h:4675:27: note: static v8::Localv8::Signature v8::Signature::New(v8::Isolate, v8::Localv8::FunctionTemplate)
static Local<Signature> New(
^
/home/user/.node-gyp/4.7.3/include/node/v8.h:4675:27: note: candidate expects 2 arguments, 4 provided
In file included from ../src/Canvas.h:22:0,
from ../src/Canvas.cc:7:
../../../../canvas/node_modules/nan/nan.h: At global scope:
../../../../canvas/node_modules/nan/nan.h:424:3: error: redefinition of ‘v8::Local<T> NanNew(P) [with T = v8::StringObject; P = v8::Localv8::String]’
NanNew<v8::StringObject, v8::Handlev8::String >(
^
../../../../canvas/node_modules/nan/nan.h:417:3: error: ‘v8::Local<T> NanNew(P) [with T = v8::StringObject; P = v8::Localv8::String]’ previously declared
here
NanNew<v8::StringObject, v8::Localv8::String >(
^
../../../../canvas/node_modules/nan/nan.h:442:36: error: redefinition of ‘template<class T> v8::Localv8::RegExp NanNew(v8::Localv8::String,
v8::RegExp::Flags)’
NAN_INLINE v8::Localv8::RegExp NanNew(
^
../../../../canvas/node_modules/nan/nan.h:436:36: error: ‘template<class T> v8::Localv8::RegExp NanNew(v8::Handlev8::String, v8::RegExp::Flags)’ previously
declared here
NAN_INLINE v8::Localv8::RegExp NanNew(
^
../../../../canvas/node_modules/nan/nan.h:454:36: error: redefinition of ‘template<class T, class P> v8::Localv8::RegExp NanNew(v8::Localv8::String,
v8::RegExp::Flags)’
NAN_INLINE v8::Localv8::RegExp NanNew(
^
../../../../canvas/node_modules/nan/nan.h:448:36: error: ‘template<class T, class P> v8::Localv8::RegExp NanNew(v8::Handlev8::String, v8::RegExp::Flags)’
previously declared here
NAN_INLINE v8::Localv8::RegExp NanNew(
^
../../../../canvas/node_modules/nan/nan.h:623:19: error: ‘NanNew’ declared as an ‘inline’ variable
v8::String::ExternalAsciiStringResource resource) {
^
../../../../canvas/node_modules/nan/nan.h:623:19: warning: ‘always_inline’ attribute ignored [-Wattributes]
../../../../canvas/node_modules/nan/nan.h:623:19: error: ‘v8::Localv8::String NanNew’ redeclared as different kind of symbol
../../../../canvas/node_modules/nan/nan.h:617:36: error: previous declaration of ‘v8::Localv8::String NanNew(v8::String::ExternalStringResource)’
NAN_INLINE v8::Localv8::String NanNew(
^
../../../../canvas/node_modules/nan/nan.h:623:7: error: ‘ExternalAsciiStringResource’ is not a member of ‘v8::String’
v8::String::ExternalAsciiStringResource resource) {
^
../../../../canvas/node_modules/nan/nan.h:623:48: error: ‘resource’ was not declared in this scope
v8::String::ExternalAsciiStringResource resource) {
^
../../../../canvas/node_modules/nan/nan.h:637:27: error: redefinition of ‘template<class T> v8::Local<T> _NanEscapeScopeHelper(v8::Local<T>)’
NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Local<T> val) {
^
../../../../canvas/node_modules/nan/nan.h:632:27: error: ‘template<class T> v8::Local<T> _NanEscapeScopeHelper(v8::Handle<T>)’ previously declared here
NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Handle<T> val) {
^
../../../../canvas/node_modules/nan/nan.h:889:13: error: ‘node::smalloc’ has not been declared
, node::smalloc::FreeCallback callback
^
../../../../canvas/node_modules/nan/nan.h:889:35: error: expected ‘,’ or ‘...’ before ‘callback’
, node::smalloc::FreeCallback callback
^
../../../../canvas/node_modules/nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(char, size_t, int)’:
../../../../canvas/node_modules/nan/nan.h:893:50: error: ‘callback’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../../../../canvas/node_modules/nan/nan.h:893:60: error: ‘hint’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../../../../canvas/node_modules/nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(const char, uint32_t)’:
../../../../canvas/node_modules/nan/nan.h:900:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
../../../../canvas/node_modules/nan/nan.h:900:67: note: candidates are:
In file included from ../../../../canvas/node_modules/nan/nan.h:179:0,
from ../src/Canvas.h:22,
from ../src/Canvas.cc:7:
/home/user/.node-gyp/4.7.3/include/node/node_buffer.h:34:40: note: v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate*, v8::Localv8::String,
node::encoding) make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit
(/home/user/.meteor/packages/meteor-tool/.1.4.3_1.bowl2a++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
gyp ERR! System Linux 4.2.0-42-generic
gyp ERR! command "/home/user/.meteor/packages/meteor-tool/.1.4.3_1.bowl2a++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node"
"/home/user/.meteor/packages/meteor-tool/.1.4.3_1.bowl2a++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild"
gyp ERR! cwd
/home/user/.meteor/packages/peerlibrary_pdf.js/.1.0.791_4.tvdedz++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/.temp-11aime5/node_modules/canvas
gyp ERR! node -v v4.7.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Linux 4.2.0-42-generic
npm ERR! argv "/home/user/.meteor/packages/meteor-tool/.1.4.3_1.bowl2a++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node"
"/home/user/.meteor/packages/meteor-tool/.1.4.3_1.bowl2a++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/npm" "rebuild"
"--update-binary"
npm ERR! node v4.7.3
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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 canvas 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 canvas
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls canvas
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /home/user/.meteor/packages/peerlibrary_pdf.js/.1.0.791_4.tvdedz++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/.temp-11aime5/npm-debug.log
Please let me know if i am missing something...
Oh, this package probably does not compile since Meteor moved from 0.10 node version.
Thank you for quick reply. Any other alternative library there?