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

module fails to install using 'yarn add' #9

Closed
george-freebirdrides opened this issue May 22, 2018 · 3 comments
Closed

module fails to install using 'yarn add' #9

george-freebirdrides opened this issue May 22, 2018 · 3 comments

Comments

@george-freebirdrides
Copy link

george-freebirdrides commented May 22, 2018

Command run: yarn add crfsuite

Expected behavior: module is installed successfully

Actual behavior:

yarn add crfsuite [11:57:35]
yarn add v0.27.5
[1/4] Resolving packages...
warning crfsuite > node-pre-gyp-github > github@0.2.4: 'github' has been renamed to '@octokit/rest' (https://git.io/vNB11)
[2/4] Fetching packages...
warning url@0.7.9: The engine "ender" appears to be invalid.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/1] ⡀ crfsuite: gyp: Undefined variable module_name in binding.gyp while trying to load binding.gyp
[-/1] ⡀ waiting...
[-/1] ⡀ waiting...
[-/1] ⡀ waiting...
error /Users/george/Documents/hapi/node_modules/crfsuite: Command failed.
Exit code: 1
Command: sh
Arguments: -c node-gyp rebuild
Directory: /Users/george/Documents/hapi/node_modules/crfsuite
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@8.9.3 | darwin | x64
gyp info spawn /usr/local/bin/python2
gyp info spawn args [ '/Users/george/Documents/hapi/node_modules/crfsuite/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/george/Documents/hapi/node_modules/crfsuite/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/george/Documents/hapi/node_modules/crfsuite/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/george/.node-gyp/8.9.3/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/george/.node-gyp/8.9.3',
gyp info spawn args '-Dnode_gyp_dir=/Users/george/Documents/hapi/node_modules/crfsuite/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/george/.node-gyp/8.9.3/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/george/Documents/hapi/node_modules/crfsuite',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp: Undefined variable module_name in binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Users/george/Documents/hapi/node_modules/crfsuite/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/Users/george/.nvm/versions/node/v8.9.3/bin/node" "/Users/george/Documents/hapi/node_modules/crfsuite/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/george/Documents/hapi/node_modules/crfsuite
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Installing with npm seems to work, but we're based on yarn at this point.

@vunb
Copy link
Owner

vunb commented May 23, 2018

Hi @george-freebirdrides

Thank you for reporting this issue. I will investigate on the subject.

@pongsatt
Copy link

pongsatt commented Sep 8, 2018

Hi,
I try changing from "postinstall" to "install" to package.json and it seems to work.

@vunb
Copy link
Owner

vunb commented Sep 9, 2018

Would you please send a PR? Thank you @pongsatt

@vunb vunb mentioned this issue Jun 5, 2019
@vunb vunb closed this as completed Jun 5, 2019
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

3 participants