This repository was archived by the owner on Jun 18, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 18, 2021. It is now read-only.
Error while running npm install -g composer-cli #112
Copy link
Copy link
Closed
Description
Hello,
Following error is getting generated while running "npm install -g composer-cli" - please clarify how to get this issue resolved:
F:\open_source\blockchain>npm install -g composer-cli
C:\Users\Aspire E1-572\AppData\Roaming\npm\composer -> C:\Users\Aspire E1-572\AppData\Roaming\npm\node_modules\composer-
cli\cli.js
> dtrace-provider@0.8.7 install C:\Users\Aspire E1-572\AppData\Roaming\npm\node_modules\composer-cli\node_modules\dtrace
-provider
> node-gyp rebuild || node suppress-error.js
C:\Users\Aspire E1-572\AppData\Roaming\npm\node_modules\composer-cli\node_modules\dtrace-provider>if not defined npm_con
fig_node_gyp (node "C:\Users\Aspire E1-572\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\nod
e-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
> node-report@2.2.1 install C:\Users\Aspire E1-572\AppData\Roaming\npm\node_modules\composer-cli\node_modules\node-repor
t
> node-gyp rebuild
C:\Users\Aspire E1-572\AppData\Roaming\npm\node_modules\composer-cli\node_modules\node-report>if not defined npm_config_
node_gyp (node "C:\Users\Aspire E1-572\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gy
p\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
node_report.cc
module.cc
utilities.cc
C:\Program Files (x86)\Windows Kits\8.1\Include\um\dbghelp.h(1544): warning C4091: 'typedef ': ignored on left of '' wh
en no variable is declared (compiling source file ..\src\node_report.cc) [C:\Users\Aspire E1-572\AppData\Roaming\npm\no
de_modules\composer-cli\node_modules\node-report\build\api.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\dbghelp.h(3190): warning C4091: 'typedef ': ignored on left of '' wh
en no variable is declared (compiling source file ..\src\node_report.cc) [C:\Users\Aspire E1-572\AppData\Roaming\npm\no
de_modules\composer-cli\node_modules\node-report\build\api.vcxproj]
win_delay_load_hook.c
C:\Users\Aspire E1-572\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(34): error
C2373: '__pfnDliNotifyHook2': redefinition; different type modifiers [C:\Users\Aspire E1-572\AppData\Roaming\npm\node_m
odules\composer-cli\node_modules\node-report\build\api.vcxproj]
D:\open_source\MicrosoftVisualStudio14\VC\include\delayimp.h(134): note: see declaration of '__pfnDliNotifyHook2'
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\Aspire E1-572\AppData\Roaming\npm\node_modules\npm\node_modules\node
-gyp\lib\build.js:276:23)
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 Windows_NT 6.3.9600
gyp ERR! command "D:\\open_source\\nodejs\\node.exe" "C:\\Users\\Aspire E1-572\\AppData\\Roaming\\npm\\node_modules\\npm
\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Aspire E1-572\AppData\Roaming\npm\node_modules\composer-cli\node_modules\node-report
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.3.0
gyp ERR! not ok
C:\Users\Aspire E1-572\AppData\Roaming\npm
`-- (empty)
npm WARN optional Skipping failed optional dependency /composer-cli/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.4
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "D:\\open_source\\nodejs\\node.exe" "C:\\Users\\Aspire E1-572\\AppData\\Roaming\\npm\\node_modules\\npm\\b
in\\npm-cli.js" "install" "-g" "composer-cli"
npm ERR! node v8.11.1
npm ERR! npm v3.8.0
npm ERR! code ELIFECYCLE
npm ERR! node-report@2.2.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-report@2.2.1 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 node-report 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 node-report
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-report
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! F:\open_source\blockchain\npm-debug.log
npm ERR! code 1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
richardlau commentedon Jul 1, 2018
I think you're running into nodejs/node-gyp#952 -- It looks like you are running on an older version of npm and node-gyp in
C:\Users\Aspire E1-572\AppData\Roaming\npm\. Node.js v8.11.1 should have come with npm 5.6.0.Abhik1998 commentedon Oct 3, 2018
m facing same issue
eddiehartman commentedon Oct 8, 2018
I re-installed npm using npm:
and that solved it for me.
adasari commentedon Dec 15, 2018
upgrading npm version didnt resolve the issue. I am currently using node 8.14.0 and npm 6.5.0
Do you have any workaround ? Thanks.
Abhik1998 commentedon Dec 15, 2018
Hii I have resolved the problem . Actually let me know of the version
If there is a mismatch in the version of node-gyp and your OS (or JDK version). then this happens . Is it like you are running it on windows?
sandra-calvo commentedon Jan 5, 2019
Hi,
I have the same problem.
I am currently using Node version v10.15.0 and npm version 6.5.0.
seasiainfotech commentedon Jan 8, 2019
Yes installing on windows, please suggest a solution.
Abhik1998 commentedon Jan 8, 2019
For Linux:
run
sudo apt-get updateIf the problem exists then (same for windows)
npm config get prefixThis will give your npm path.
It can give something like: /usr/local/share/npm
Write the following command on your .bashrc or .bash_profile file or simply run the command on your terminal:
export
PATH="/usr/local/share/npm/bin:$PATH"But if it doesnot work then you shoud consider reinstalling npm
amaka98 commentedon Feb 9, 2019
Hello, I have the same problem. I am using a Mac: node version: v8.15.0, npm version: 6.7.0
I appreciate any help.
mhdawson commentedon Feb 11, 2019
@richardlau do you have any suggestions?
richardlau commentedon Feb 12, 2019
@amaka98 Can you post your npm install log, possibly in a new issue? I don't think you can be seeing the same problem as the original post (
...\win_delay_load_hook.c(34): error C2373: '__pfnDliNotifyHook2': redefinition; different type modifiers) on a Mac as that error is Windows specific and related to an outdated version ofnode-gyp.praveensharmajpr commentedon Feb 22, 2019
Where te file path for .bashrc or .bash_profile file in Windows 10 machine
praveensharmajpr commentedon Feb 24, 2019
any suggestion to resolve this issue on windows 10 machine.
richardlau commentedon Feb 24, 2019
@praveensharmajpr What is your actual issue? Can you post your npm install log?
praveensharmajpr commentedon Feb 24, 2019
i am trying to setup hyperledger composer on my windows 10 machine. i am getting error as reported in issue. here is the log file
C:\Users\prave\AppData\Roaming\npm\node_modules\composer-cli\node_modules\node-report>if not defined npm_config_node_gyp (node "C:\Users\prave\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\prave\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
node_report.cc
module.cc
utilities.cc
win_delay_load_hook.cc
c:\users\prave\appdata\roaming\npm\node_modules\composer-cli\node_modules\node-report\src\utilities.cc(421): error C203
9: 'due': is not a member of 'uv_timer_s' [C:\Users\prave\AppData\Roaming\npm\node_modules\composer-cli\node_modules\no
de-report\build\api.vcxproj]
c:\users\prave.node-gyp\10.15.1\include\node\uv.h(800): note: see declaration of 'uv_timer_s'
gyp ERR! build error
gyp ERR! stack Error:
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exefailed with exit code: 1gyp ERR! stack at ChildProcess.onExit (C:\Users\prave\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\prave\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\prave\AppData\Roaming\npm\node_modules\composer-cli\node_modules\node-report
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\composer-cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-report@2.2.1 install:
node-gyp rebuildnpm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-report@2.2.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\prave\AppData\Roaming\npm-cache_logs\2019-02-24T15_22_32_747Z-debug.log
13 remaining items
insafachour commentedon Nov 4, 2019
@richardlau how to upgrade node-report?
richardlau commentedon Nov 4, 2019
You'll need to get the
composer-clipackage to update the version ofnode-reportthey require.yatashashank commentedon Dec 9, 2019
Seems like composer-cli is deprecated
https://www.npmjs.com/package/composer-cli
yatashashank commentedon Dec 9, 2019
I tried with node 10.16.3 but still see the same error.
richardlau commentedon Dec 9, 2019
@yatashashank What error? There's two different errors reported in this issue -- the original
error C2373: '__pfnDliNotifyHook2': redefinition;which looks to be an out of datenode-gypissue and theerror C2039: 'due': is not a member of 'uv_timer_s'issue which is an out of date version ofnode-report.yatashashank commentedon Dec 9, 2019
The gyp Build Error.
#112 (comment). I was looking to install composer-cli but seems like it's deprecated. Tried downing node from 12 to 10 but still no luck. Is there any update on this issue @richardlau ??
richardlau commentedon Dec 9, 2019
@yatashashank what version of node-gyp is reported in your error log?
deepcrysp commentedon Dec 9, 2019
Deepaks-MacBook-Air:~ deepak$ npm i composer-cli
npm WARN deprecated composer-cli@0.20.9: Hyperledger Composer has been deprecated. Please see the README for more details: https://github.com/hyperledger/composer/blob/master/README.md
npm WARN deprecated composer-documentation@0.20.9: Hyperledger Composer has been deprecated. Please see the README for more details: https://github.com/hyperledger/composer/blob/master/README.md
npm WARN deprecated composer-wallet-filesystem@0.20.9: Hyperledger Composer has been deprecated. Please see the README for more details: https://github.com/hyperledger/composer/blob/master/README.md
npm WARN deprecated composer-report@0.20.9: Hyperledger Composer has been deprecated. Please see the README for more details: https://github.com/hyperledger/composer/blob/master/README.md
npm WARN deprecated composer-wallet-inmemory@0.20.9: Hyperledger Composer has been deprecated. Please see the README for more details: https://github.com/hyperledger/composer/blob/master/README.md
npm WARN deprecated composer-client@0.20.9: Hyperledger Composer has been deprecated. Please see the README for more details: https://github.com/hyperledger/composer/blob/master/README.md
npm WARN deprecated composer-admin@0.20.9: Hyperledger Composer has been deprecated. Please see the README for more details: https://github.com/hyperledger/composer/blob/master/README.md
npm WARN deprecated composer-common@0.20.9: Hyperledger Composer has been deprecated. Please see the README for more details: https://github.com/hyperledger/composer/blob/master/README.md
npm WARN deprecated composer-connector-proxy@0.20.9: Hyperledger Composer has been deprecated. Please see the README for more details: https://github.com/hyperledger/composer/blob/master/README.md
npm WARN deprecated composer-connector-hlfv1@0.20.9: Hyperledger Composer has been deprecated. Please see the README for more details: https://github.com/hyperledger/composer/blob/master/README.md
npm WARN deprecated core-js@2.3.0: core-js@<3.0 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated hoek@4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated json3@3.3.2: Please use the native JSON object instead of JSON 3
npm WARN deprecated fsevents@1.2.9: One of your dependencies needs to upgrade to fsevents v2: 1) Proper nodejs v10+ support 2) No more fetching binaries from AWS, smaller package size
CXX(target) Release/obj.target/api/src/node_report.o
../src/node_report.cc:512:52: error: too few arguments to function call, expected 2, have 1
PrintStackFrame(out, isolate, stack->GetFrame(i), i, nullptr);
~~~~~~~~~~~~~~~ ^
/Users/deepak/Library/Caches/node-gyp/12.13.1/include/node/v8.h:1890:3: note: 'GetFrame' declared here
Local GetFrame(Isolate* isolate, uint32_t index) const;
^
../src/node_report.cc:548:54: error: too few arguments to function call, expected 2, have 1
PrintStackFrame(out, isolate, stack->GetFrame(i), i, samples[i]);
~~~~~~~~~~~~~~~ ^
/Users/deepak/Library/Caches/node-gyp/12.13.1/include/node/v8.h:1890:3: note: 'GetFrame' declared here
Local GetFrame(Isolate* isolate, uint32_t index) const;
^
../src/node_report.cc:550:54: error: too few arguments to function call, expected 2, have 1
PrintStackFrame(out, isolate, stack->GetFrame(i), i, nullptr);
~~~~~~~~~~~~~~~ ^
/Users/deepak/Library/Caches/node-gyp/12.13.1/include/node/v8.h:1890:3: note: 'GetFrame' declared here
Local GetFrame(Isolate* isolate, uint32_t index) const;
^
3 errors generated.
make: *** [Release/obj.target/api/src/node_report.o] Error 1
gyp ERR! build error
gyp ERR! stack Error:
makefailed with exit code: 2gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/deepak/node_modules/composer-report/node_modules/node-report
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN notsup Unsupported engine for fabric-ca-client@1.2.1: wanted: {"node":"^8.9.0","npm":"^5.5.1"} (current: {"node":"12.13.1","npm":"6.12.1"})
npm WARN notsup Not compatible with your version of node/npm: fabric-ca-client@1.2.1
npm WARN notsup Unsupported engine for fabric-client@1.2.1: wanted: {"node":"^8.9.0","npm":"^5.5.1"} (current: {"node":"12.13.1","npm":"6.12.1"})
npm WARN notsup Not compatible with your version of node/npm: fabric-client@1.2.1
npm WARN deepak No description
npm WARN deepak No repository field.
npm WARN deepak No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-report@2.2.1 install:
node-gyp rebuildnpm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-report@2.2.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/deepak/.npm/_logs/2019-12-09T16_46_28_362Z-debug.log
Deepaks-MacBook-Air:~ deepak$
richardlau commentedon Dec 9, 2019
@deepcrysp I already responded to your error log in #112 (comment)
deepcrysp commentedon Dec 9, 2019
I have installed node-report 2.2.4 but its still taking node-report 2.2.1 ..
yatashashank commentedon Dec 9, 2019
With node 12
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v5.0.5
With node 10
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v3.8.0
@richardlau
richardlau commentedon Dec 9, 2019
@deepcrysp @yatashashank Okay it looks like the problem is with
composer-cli-- they've fixed the version ofnode-reportin their package.json to 2.2.1 (instead of using semver ranges to allow newer versions): https://github.com/hyperledger/composer/blob/06ac7a75090eb552752b9c0526b9dabb7a69f65d/packages/composer-cli/package.json#L57 and the errors you're seeing were fixed innode-report2.2.4.I suggest you submit a pull request to
composer-cli(it's deprecated but they say "if you wish to submit code changes via pull requests, these will be merged.") to update the version of node-report it is depending on. Or switch to Hyperledger Fabric instead of the deprecated Hyperledger Composer.insafachour commentedon Dec 16, 2019
Hello i steel have the error composer-cli is not installed.
Please any help
richardlau commentedon Dec 16, 2019
@insafachour Your options are to either to try to get https://github.com/hyperledger/composer to update their dependency on an outdated version of
node-reportor switch to the non-deprecated Hyperledger Fabric. There's nothing else we can do here innode-reportas the errors have already been fixed.