Error on install
I am getting the following error while installing:
> node-gyp rebuild
CC(target) Release/obj.target/libpcre/deps/libpcre/pcre_byte_order.o
CC(target) Release/obj.target/libpcre/deps/libpcre/pcre_chartables.o
CC(target) Release/obj.target/libpcre/deps/libpcre/pcre_compile.o
CC(target) Release/obj.target/libpcre/deps/libpcre/pcre_config.o
CC(target) Release/obj.target/libpcre/deps/libpcre/pcre_exec.o
CC(target) Release/obj.target/libpcre/deps/libpcre/pcre_fullinfo.o
CC(target) Release/obj.target/libpcre/deps/libpcre/pcre_get.o
CC(target) Release/obj.target/libpcre/deps/libpcre/pcre_globals.o
CC(target) Release/obj.target/libpcre/deps/libpcre/pcre_jit_compile.o
CC(target) Release/obj.target/libpcre/deps/libpcre/pcre_maketables.o
CC(target) Release/obj.target/libpcre/deps/libpcre/pcre_newline.o
CC(target) Release/obj.target/libpcre/deps/libpcre/pcre_ord2utf8.o
CC(target) Release/obj.target/libpcre/deps/libpcre/pcre_refcount.o
CC(target) Release/obj.target/libpcre/deps/libpcre/pcre_string_utils.o
CC(target) Release/obj.target/libpcre/deps/libpcre/pcre_study.o
CC(target) Release/obj.target/libpcre/deps/libpcre/pcre_tables.o
CC(target) Release/obj.target/libpcre/deps/libpcre/pcre_ucd.o
CC(target) Release/obj.target/libpcre/deps/libpcre/pcre_valid_utf8.o
CC(target) Release/obj.target/libpcre/deps/libpcre/pcre_version.o
CC(target) Release/obj.target/libpcre/deps/libpcre/pcre_xclass.o
LIBTOOL-STATIC Release/pcre.a
CXX(target) Release/obj.target/pcre/src/binding.o
../src/binding.cc:138:21: error: expected class name
class PCRE : public ObjectWrap {
^
../src/binding.cc:159:36: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle<Value> New(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/username/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../src/binding.cc:184:37: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle<Value> Load(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/username/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../src/binding.cc:229:37: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle<Value> Save(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/username/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../src/binding.cc:251:36: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle<Value> Set(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/username/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../src/binding.cc:298:38: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle<Value> Study(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/username/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../src/binding.cc:350:38: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle<Value> Exec_(const Arguments& args, int what = WHAT_EXEC) {
^~~~~~~~~
v8::internal::Arguments
/Users/username/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../src/binding.cc:647:37: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle<Value> Exec(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/username/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../src/binding.cc:651:40: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle<Value> ExecAll(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/username/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../src/binding.cc:655:37: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle<Value> Test(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/username/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../src/binding.cc:659:40: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle<Value> Version(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/username/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../src/binding.cc:160:19: error: calling a protected constructor of class 'v8::HandleScope'
HandleScope scope;
^
/Users/username/.node-gyp/0.12.4/deps/v8/include/v8.h:816:13: note: declared protected here
V8_INLINE HandleScope() {}
^
../src/binding.cc:162:16: error: member access into incomplete type 'const v8::internal::Arguments'
if (!args.IsConstructCall()) {
^
/Users/username/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: forward declaration of 'v8::internal::Arguments'
class Arguments;
^
../src/binding.cc:164:13: error: no member named 'New' in 'v8::String'; did you mean simply 'New'?
String::New("Use `new` to create instances of this object."))
^~~~~~~~~~~
New
../src/binding.cc:159:26: note: 'New' declared here
static Handle<Value> New(const Arguments& args) {
^
../src/binding.cc:164:25: error: reference to type 'const v8::internal::Arguments' could not bind to an lvalue of type 'const char [46]'
String::New("Use `new` to create instances of this object."))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:159:47: note: passing argument to parameter 'args' here
static Handle<Value> New(const Arguments& args) {
^
../src/binding.cc:169:12: error: no member named 'Wrap' in 'PCRE'
obj->Wrap(args.This());
~~~ ^
../src/binding.cc:169:21: error: member access into incomplete type 'const v8::internal::Arguments'
obj->Wrap(args.This());
^
/Users/username/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: forward declaration of 'v8::internal::Arguments'
class Arguments;
^
../src/binding.cc:171:15: error: member access into incomplete type 'const v8::internal::Arguments'
if (args.Length() >= 1) {
^
/Users/username/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: forward declaration of 'v8::internal::Arguments'
class Arguments;
^
../src/binding.cc:172:37: error: type 'const v8::internal::Arguments' does not provide a subscript operator
if (Buffer::HasInstance(args[0]))
~~~~^~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/pcre/src/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/username/Sites/node-root/css-parser/node_modules/pcre
gyp ERR! node -v v0.12.4
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "pcre"
npm ERR! node v0.12.4
npm ERR! npm v2.12.0
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! This is most likely a problem with the pcre 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 pcre
npm ERR! There is likely additional logging output above.
My $PATH:
echo $PATH;
/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin:/usr/bin
Yes this is a known issue, I haven't gotten around to nan-ifying this addon yet.
+1
Use node v0.10 and all works. @mscdex, maybe we could rewrite this wrapper for the new wrapper API. Do you know how this could start?
@paulobezerr I'd be open to a PR to update this addon if someone has some free time. If you're not familiar with nan already, you can use some of their examples, documentation, and tests as guides.
I have forked the repo and started working on a conversion to using NAN. This is slightly complex as V8 has moved away from direct return values - meaning that there are a few places where private helper functions are going to be needed to keep things clean.
Watching the red shrink&grow as the compiler makes it to different places and through chunks that are now working right is lots of fun!
Hi, I get a similar error while using this module in node v5.9.0. It'll be great to see this amazing module work with latest node versions:
module.js:440
return process.dlopen(module, path._makeLong(filename));
^
Error: Module did not self-register.
at Error (native)
at Object.Module._extensions..node (module.js:440:18)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (/home/user/project/node_modules/pcre/lib/pcre.js:1:74)
This errors happens when I run my node script and it happens on the line where I include the pcre lib.
var PCRE = require("pcre").PCRE;
Any patch or work around?!!
make: *** [Release/obj.target/pcre/src/binding.o] Error 1
make: Leaving directory `/tmp/test/node_modules/pcre/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:321:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 3.10.0-327.el7.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/test/node_modules/pcre
gyp ERR! node -v v13.6.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok