danielgtaylor / aglio

An API Blueprint renderer with theme support that outputs static HTML
4.75k stars 480 forks source link

Unable to install aglio - node-gyp rebuild fails #264

Closed gracedigital closed 7 years ago

gracedigital commented 8 years ago

╰─➤ sudo npm install -g aglio
npm WARN lifecycle aglio@2.2.1~prepublish: cannot run in wd %s %s (wd=%s) aglio@2.2.1 grunt compile /Users/christian/Development/node/aglio npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer /usr/local/bin/aglio -> /usr/local/lib/node_modules/aglio/bin/aglio.js

fsevents@1.0.12 install /usr/local/lib/node_modules/aglio/node_modules/fsevents node-pre-gyp install --fallback-to-build

env: node: No such file or directory npm WARN install:fsevents@1.0.12 fsevents@1.0.12 install: node-pre-gyp install --fallback-to-build npm WARN install:fsevents@1.0.12 spawn ENOENT

protagonist@1.3.3 install /usr/local/lib/node_modules/aglio/node_modules/protagonist node-gyp rebuild

/usr/local/lib/node_modules/npm/bin/node-gyp-bin/node-gyp: line 3: node: command not found /usr/local/lib └── (empty)

npm ERR! Darwin 15.5.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "aglio" npm ERR! node v6.2.0 npm ERR! npm v3.8.9 npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn

npm ERR! protagonist@1.3.3 install: node-gyp rebuild npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the protagonist@1.3.3 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 protagonist 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 protagonist npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls protagonist npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/christian/Development/node/npm-debug.log npm ERR! code 1

richdynamix commented 8 years ago

I am also seeing this issue -

➤ npm install -g aglio                                                   20:22:04
npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
/usr/local/bin/aglio -> /usr/local/lib/node_modules/aglio/bin/aglio.js

> fsevents@1.0.12 install /usr/local/lib/node_modules/aglio/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

[fsevents] Success: "/usr/local/lib/node_modules/aglio/node_modules/fsevents/lib/binding/Release/node-v47-darwin-x64/fse.node" is installed via remote

> protagonist@1.3.3 install /usr/local/lib/node_modules/aglio/node_modules/protagonist
> node-gyp rebuild

  CXX(target) Release/obj.target/libmarkdownparser/drafter/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.o
  CXX(target) Release/obj.target/libmarkdownparser/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownNode.o
  CXX(target) Release/obj.target/libmarkdownparser/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownParser.o
  LIBTOOL-STATIC Release/markdownparser.a
libtool: unrecognized option `-static'
libtool: Try `libtool --help' for more information.
make: *** [Release/markdownparser.a] 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:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Darwin 15.4.0
gyp ERR! command "/usr/local/Cellar/node/5.10.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/aglio/node_modules/protagonist
gyp ERR! node -v v5.10.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
/usr/local/lib
└── (empty)

npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/Cellar/node/5.10.1/bin/node" "/usr/local/bin/npm" "install" "-g" "aglio"
npm ERR! node v5.10.1
npm ERR! npm  v3.8.3
npm ERR! code ELIFECYCLE

npm ERR! protagonist@1.3.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the protagonist@1.3.3 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 protagonist 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 protagonist
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls protagonist
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/sarichardson/Sites/techup/npm-debug.log
npm ERR! code 1
ghost commented 8 years ago

I had similar issues and needed to install GCC or some compiler.

jdpnielsen commented 8 years ago

For windows - try following these steps: https://github.com/nodejs/node-gyp/issues/629#issuecomment-153196245

ArthurHoaro commented 8 years ago

/usr/local/lib/node_modules/npm/bin/node-gyp-bin/node-gyp: line 3: node: command not found

I had the same issue on Ubuntu. Fixed with apt install nodejs-legacy.