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

Does not installl on iojs (OSX) #268

Closed
medikoo opened this issue Jan 14, 2015 · 21 comments
Closed

Does not installl on iojs (OSX) #268

medikoo opened this issue Jan 14, 2015 · 21 comments

Comments

@medikoo
Copy link

medikoo commented Jan 14, 2015

I wanted to try v1.0.1 of io, but it looks bcrypt doesn't compile over there. Not sure what's the source of the issue.

> bcrypt@0.8.0 install /Users/medikoo/Projects/_tests/bcrypt/node_modules/bcrypt
> node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead.
  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
In file included from ../src/bcrypt_node.cc:31:
../node_modules/nan/nan.h:481:19: error: no type named 'ExternalAsciiStringResource' in 'v8::String'; did you mean 'ExternalStringResource'?
      v8::String::ExternalAsciiStringResource *resource) {
      ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
                  ExternalStringResource
/Users/medikoo/.node-gyp/1.0.1/deps/v8/include/v8.h:2016:19: note: 'ExternalStringResource' declared here
  class V8_EXPORT ExternalStringResource
                  ^
In file included from ../src/bcrypt_node.cc:31:
../node_modules/nan/nan.h:480:36: error: redefinition of 'NanNew'
  NAN_INLINE v8::Local<v8::String> NanNew(
                                   ^
../node_modules/nan/nan.h:475:36: note: previous definition is here
  NAN_INLINE v8::Local<v8::String> NanNew(
                                   ^
../node_modules/nan/nan.h:2103:12: error: no member named 'IsExternalAscii' in 'v8::String'; did you mean 'IsExternal'?
  if (str->IsExternalAscii()) {
           ^~~~~~~~~~~~~~~
           IsExternal
/Users/medikoo/.node-gyp/1.0.1/deps/v8/include/v8.h:1980:8: note: 'IsExternal' declared here
  bool IsExternal() const;
       ^
In file included from ../src/bcrypt_node.cc:31:
../node_modules/nan/nan.h:2104:23: error: no type named 'ExternalAsciiStringResource' in 'v8::String'; did you mean 'ExternalStringResource'?
    const v8::String::ExternalAsciiStringResource* ext;
          ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
                      ExternalStringResource
/Users/medikoo/.node-gyp/1.0.1/deps/v8/include/v8.h:2016:19: note: 'ExternalStringResource' declared here
  class V8_EXPORT ExternalStringResource
                  ^
In file included from ../src/bcrypt_node.cc:31:
../node_modules/nan/nan.h:2105:16: error: no member named 'GetExternalAsciiStringResource' in 'v8::String'; did you mean 'GetExternalOneByteStringResource'?
    ext = str->GetExternalAsciiStringResource();
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
               GetExternalOneByteStringResource
/Users/medikoo/.node-gyp/1.0.1/deps/v8/include/v8.h:2083:40: note: 'GetExternalOneByteStringResource' declared here
  const ExternalOneByteStringResource* GetExternalOneByteStringResource() const;
                                       ^
In file included from ../src/bcrypt_node.cc:31:
../node_modules/nan/nan.h:2105:9: error: assigning to 'const v8::String::ExternalStringResource *' from incompatible type 'const v8::String::ExternalOneByteStringResource *'
    ext = str->GetExternalAsciiStringResource();
        ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:2106:11: error: assigning to 'const char *' from incompatible type 'const uint16_t *' (aka 'const unsigned short *')
    *data = ext->data();
          ^ ~~~~~~~~~~~
7 errors generated.
make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.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:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1038:12)
gyp ERR! System Darwin 14.0.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/medikoo/Projects/_tests/bcrypt/node_modules/bcrypt
gyp ERR! node -v v1.0.1
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok 
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "bcrypt"
npm ERR! node v1.0.1
npm ERR! npm  v2.1.18
npm ERR! code ELIFECYCLE

npm ERR! bcrypt@0.8.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bcrypt@0.8.0 install script 'node-gyp rebuild'.
npm ERR! 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 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!     /Users/medikoo/Projects/_tests/bcrypt/npm-debug.log
@defunctzombie
Copy link
Collaborator

Jesus. Already?

@medikoo
Copy link
Author

medikoo commented Jan 14, 2015

:)

@medikoo
Copy link
Author

medikoo commented Jan 14, 2015

Just found it's most likely related to NaN not yet been updated -> nodejs/node#367 (comment)

@ncb000gt
Copy link
Member

I literally just laughed out loud @defunctzombie. :D

@wavded
Copy link
Contributor

wavded commented Jan 14, 2015

Just made a PR that addresses this -> #269

@tlhunter
Copy link

I can confirm this happening on Debian as well.

@c1freitas
Copy link

They are attempting to track packages that do not compile.

nodejs/node#456

@defunctzombie
Copy link
Collaborator

closed with the release of 0.8.1

@dvlsg
Copy link

dvlsg commented Jan 23, 2015

Any other windows users still experiencing an issue? I'm on Windows 7 x64, and I'm still getting an error thrown from bindings\bindings.js:79 with the description "Error: Module did not self-register." while I'm using iojs, bcrypt 8.1 (with nan 1.5.0 and bindings 1.0.0). Bcrypt appears to make it through node-gyp just fine, but when I try opening the project and requiring bcrypt through iojs.exe, I get the error above.

@ncb000gt
Copy link
Member

@dvlsg Open a new issue (this one is specific to OSX) with the full output. Also, try compiling the module yourself and paste the results in that new issue please. Thanks.

@dvlsg
Copy link

dvlsg commented Jan 23, 2015

Can do. Was hoping for a quick message telling me I was messing something up. I'll post it as soon as I get a chance.

@memelet
Copy link

memelet commented Feb 4, 2015

I am using 0.8.1 with io 1.0.4 on ubuntu 14.04 and get the failure below. I do not have this problem with node v0.11.16

> bcrypt@0.8.1 install /home/bkaplan/si/vi-security-subjects/node_modules/bcrypt
> node-gyp rebuild

gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: 404 status code downloading tarball
gyp ERR! stack     at Request.<anonymous> (/home/bkaplan/.npm/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:246:14)
gyp ERR! stack     at Request.emit (events.js:120:20)
gyp ERR! stack     at Request.onRequestResponse (/home/bkaplan/.npm/lib/node_modules/npm/node_modules/request/request.js:1255:10)
gyp ERR! stack     at ClientRequest.emit (events.js:98:17)
gyp ERR! stack     at HTTPParser.parserOnIncomingClient (_http_client.js:396:21)
gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:89:23)
gyp ERR! stack     at Socket.socketOnData (_http_client.js:287:20)
gyp ERR! stack     at Socket.emit (events.js:98:17)
gyp ERR! stack     at readableAddChunk (_stream_readable.js:143:16)
gyp ERR! stack     at Socket.Readable.push (_stream_readable.js:106:10)
gyp ERR! System Linux 3.13.0-24-generic
gyp ERR! command "node" "/home/bkaplan/.npm/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/bkaplan/si/vi-security-subjects/node_modules/bcrypt
gyp ERR! node -v v1.0.4
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok 
npm ERR! Linux 3.13.0-24-generic
npm ERR! argv "node" "/home/bkaplan/.npm/bin/npm" "install"
npm ERR! node v1.0.4
npm ERR! npm  v2.4.1
npm ERR! code ELIFECYCLE

npm ERR! bcrypt@0.8.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bcrypt@0.8.1 install script 'node-gyp rebuild'.

@vbogdanov
Copy link

@memelet
I think this might be a separate issue.
I'm getting the same error (404 status code downloading tarball) on FreeBSD with io.js:

gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: 404 status code downloading tarball
gyp ERR! stack     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:246:14)
gyp ERR! stack     at Request.emit (events.js:120:20)
gyp ERR! stack     at Request.onRequestResponse (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1255:10)
gyp ERR! stack     at ClientRequest.emit (events.js:98:17)
gyp ERR! stack     at HTTPParser.parserOnIncomingClient (_http_client.js:396:21)
gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:89:23)
gyp ERR! stack     at Socket.socketOnData (_http_client.js:287:20)
gyp ERR! stack     at Socket.emit (events.js:98:17)
gyp ERR! stack     at readableAddChunk (_stream_readable.js:143:16)
gyp ERR! stack     at Socket.Readable.push (_stream_readable.js:106:10)
gyp ERR! System FreeBSD 10.1-STABLE
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/project_name/0.0.1-snapshot/node_modules/bcrypt
gyp ERR! node -v v1.0.4
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok 
npm ERR! FreeBSD 10.1-STABLE
npm ERR! argv "node" "/usr/local/bin/npm" "install" "bcrypt"
npm ERR! node v1.0.4
npm ERR! npm  v2.5.0
npm ERR! code ELIFECYCLE

npm ERR! bcrypt@0.8.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bcrypt@0.8.1 install script 'node-gyp rebuild'.

@ncb000gt
Copy link
Member

Definitely a separate issue and not one specific to this module. Download issues would be something else...

@wolfie82
Copy link

@vbogdanov I'm having the same issue, were you able to resolve it?

@vbogdanov
Copy link

@ncb000gt Is there an issue opened for the download problem?
@patbaker82 No.

@wolfie82
Copy link

Here is more verbose output. It looks like the install process is attempting to download http://nodejs.org/dist/v1.2.0/node-v1.2.0.tar.gz

> bcrypt@0.8.1 install /Users/pbaker/Desktop/node_modules/bcrypt
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp verb cli [ 'node',
gyp verb cli   '/Users/pbaker/.nvm/versions/io.js/v1.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild' ]
gyp info using node-gyp@1.0.2
gyp info using node@1.2.0 | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python /usr/bin/python
gyp verb check python version `python -c "import platform; print(platform.python_version());"` returned: "2.7.6\n"
gyp verb get node dir no --target version specified, falling back to host node version: v1.2.0
gyp verb command install [ 'v1.2.0' ]
gyp verb install input version string "v1.2.0"
gyp verb install installing version: 1.2.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 1.2.0
gyp verb ensuring nodedir is created /Users/pbaker/.node-gyp/1.2.0
gyp verb created nodedir /Users/pbaker/.node-gyp/1.2.0
gyp http GET http://nodejs.org/dist/v1.2.0/node-v1.2.0.tar.gz
gyp http 404 http://nodejs.org/dist/v1.2.0/node-v1.2.0.tar.gz
gyp WARN install got an error, rolling back install

@wolfie82
Copy link

FYI this works on the latest iojs for me.

Now using io.js v1.4.1
~ ❯❯❯ npm install bcrypt
\
> bcrypt@0.8.1 install /Users/pbaker/node_modules/bcrypt
> node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead.
  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
  SOLINK_MODULE(target) Release/bcrypt_lib.node
  SOLINK_MODULE(target) Release/bcrypt_lib.node: Finished
bcrypt@0.8.1 node_modules/bcrypt
├── bindings@1.0.0
└── nan@1.5.0

@coolaj86
Copy link

coolaj86 commented Jun 1, 2015

Not installing on v1.8.1 for me.

gyp ERR! stack Error: 404 status code downloading tarball
gyp ERR! stack     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:246:14)
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild

@wolfie82
Copy link

wolfie82 commented Jun 4, 2015

@coolaj86 Have you upgraded npm? If so that could be the problem. As in you overwrote the io.js npm version with a node one. This doesn't look to be an issue with node.bcrypt.js.

~
❯ node -v
v1.8.1

~
❯ npm install bcrypt -g
|
> bcrypt@0.8.3 install /Users/e30205/.nvm/versions/io.js/v1.8.1/lib/node_modules/bcrypt
> node-gyp rebuild

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
  SOLINK_MODULE(target) Release/bcrypt_lib.node
  SOLINK_MODULE(target) Release/bcrypt_lib.node: Finished
bcrypt@0.8.3 /Users/e30205/.nvm/versions/io.js/v1.8.1/lib/node_modules/bcrypt
├── bindings@1.2.1
└── nan@1.8.4

~ 9s

@coolaj86
Copy link

coolaj86 commented Jun 8, 2015

Thanks for the hint!

I gave all of my node, iojs, nvm, n, and node_modules a solid kick and then installed the latest bcrypt rather than the one in my package.json and it worked.

rm -rf /usr/local/*/node*
rm -rf /usr/local/*/iojs*
rm -rf /usr/local/*/npm*
rm -rf ~/.nvm*
rm -rf ~/.npm*

# To install a specific version rather than defaulting to latest
echo "v2.2.1" > /tmp/IOJS_VER

# io.js without development dependencies (assumes brew, gcc, etc already installed)
curl -fsSL bit.ly/iojs-min | bash

npm install bcrypt@latest --save

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

No branches or pull requests