I am trying to install a node chaincode in my peer using the latest chaincode lifecycle. But I am getting below error when I try to install the chaincode
peer lifecycle chaincode install testcc.tar.gz
Error:
Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Error returned from build: 1 "+ INPUT_DIR=/chaincode/input
+ OUTPUT_DIR=/chaincode/output
+ cp -R /chaincode/input/src/. /chaincode/output
+ cd /chaincode/output
+ '[' -f package-lock.json -o -f npm-shrinkwrap.json ]
+ npm install --production
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated left-pad#1.3.0: use String.prototype.padStart()
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git#github.com/DABH/diagnostics.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-06-22T12_39_49_423Z-debug.log
"
Recent changes in chaincode seems to have introduced a bad depedency. There is an ongoing discussion in the Hyperledger Fabric Rocketchat where someone claims that they are patching it now.
A link to the discussion:
https://chat.hyperledger.org/channel/fabric?msg=9FYkjy8SLyB6bBN2C
Update: Allegedly, this PR will fix the dependency issue:
https://github.com/hyperledger/fabric-chaincode-node/pull/174/files
Update2: The Pr seems to have been merged. I managed to start a fresh Fabric network without touching any dependencies.
Related
I am trying to create a React Native project using this command:
npx react-native init
But the template download just stops and shows the following message:
× Downloading template
error Error: Command failed: npm install --save --save-exact react-native#latest
npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated uglify-es#3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
npm ERR! code ECONNRESET
npm ERR! syscall read
npm ERR! errno -4077
npm ERR! network read ECONNRESET
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
Here, below "Creating a new application" title
If you previously installed a global react-native-cli package, please remove it as it may cause unexpected issues:
npm uninstall -g react-native-cli #react-native-community/cli
then
npx react-native init AwesomeProject
This is what I am currently receiving when I try to instill.
npm ERR! Unexpected end of JSON input while parsing near '...QoQAJQkmBR37svMSvUbRQ'
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/mattgranado/.npm/_logs/2021-08-31T02_54_24_892Z-debug.log
(base) mattgranado#Matts-MacBook-Pro ~ %
I did atttempt
npm cache clean --force
but only got this
npm WARN using --force I sure hope you know what you are doing.
npm ERR! Usage: npm cache add <tarball file>
npm ERR! npm cache add <folder>
npm ERR! npm cache add <tarball url>
npm ERR! npm cache add <git url>
npm ERR! npm cache add <name>#<version>
npm ERR! npm cache clean
npm ERR! npm cache verify
Then I attempted
sudo npm cache clean --force
to whom which I got the message below.
npm WARN using --force I sure hope you know what you are doing.
(base) mattgranado#Matts-MacBook-Pro ~ % npm install -g expo-cli
npm WARN deprecated graphql-tools#3.0.0: This package has been deprecated and now it only exports makeExecutableSchema.\nAnd it will no longer receive updates.\nWe recommend you to migrate to scoped packages such as #graphql-tools/schema, #graphql-tools/utils and etc.\nCheck out https://www.graphql-tools.com to learn what package you should use instead
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated uuid#3.0.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/mattgranado/.npm/_logs/2021-09-02T02_11_33_424Z-debug.log
I would really appreciate any insight on what may be causing these issues.
I am getting errors trying to run npm install on a node/react app which I am taking over development of.
I'm not trying to install any packages globally. I am on an M1 Macbook Pro running Big Sur. I did a fresh install of node and npm with Homebrew. I also tried removing the package-lock.json file, cleaning the npm cache, and adding a .npmignore file to the directory as some other posts have suggested; none of these worked.
Here is the output when I run npm install
MacBook-Pro-2 frontend % npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [my project name]-dashboard#0.1.0
npm ERR! Found: webpack#5.39.0
npm ERR! node_modules/webpack
npm ERR! webpack#"5.39.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack#"^4.0.0" from optimize-css-assets-webpack-plugin#6.0.0
npm ERR! node_modules/optimize-css-assets-webpack-plugin
npm ERR! optimize-css-assets-webpack-plugin#"6.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/<name>/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/<name>/.npm/_logs/2021-06-15T17_41_19_910Z-debug.log
I tried to run npm install --legacy-peer-deps, which causes a slightly different error:
MacBook-Pro-2 frontend % npm install --legacy-peer-deps
npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/pinpoint#1.0.2: Moved to 'npm install #sideway/pinpoint'
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated #hapi/formula#1.2.0: Moved to 'npm install #sideway/formula'
npm WARN deprecated topojson#3.0.2: Use topojson-client, topojson-server or topojson-simplify directly.
npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/joi#16.1.8: Switch to 'npm install joi'
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /Users/<name>/Developer/<directory>/frontend/node_modules/topojson/node_modules/topojson-simplify/bin/toposimplify
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/<name>/Developer/<directory>/frontend/node_modules/topojson/node_modules/topojson-simplify/bin/toposimplify'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/<name>/.npm/_logs/2021-06-15T17_41_57_785Z-debug.log
I solved my own problem. I think this is a common error message, with many potential solutions; here are 2 things I tried that fixed the issue for me:
Make sure you have postgresql installed (if your project includes a postgresql db, like mine). On a mac with homebrew, just run brew install postgresql.
I also downgraded my version of Node.js to the most up-to-date long term support version (previously I was using the dev version). At the time of writing the LTS version was 14.7.
After making these changes, I was able to get my site to install and start correctly.
I try to install module sqlite? but there is an error, what to do:
$ npm install sqlite3
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
sqlite3#5.0.0 install D:\CODE\21_data\node_modules\sqlite3
node-pre-gyp install --fallback-to-build
Node.js is only supported on Windows 8.1, Windows Server 2012 R2, or higher.
Setting the NODE_SKIP_PLATFORM_CHECK environment variable to 1 skips this
check, but Node.js might not execute correctly. Any issues encountered on
npm WARN enoent ENOENT: no such file or directory, open 'D:\CODE\21_data\package.json'
npm WARN 21_data No description
npm WARN 21_data No repository field.
npm WARN 21_data No README data
npm WARN 21_data No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 216
npm ERR! sqlite3#5.0.0 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 216
npm ERR!
npm ERR! Failed at the sqlite3#5.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Thanks for answers!
Problems solved:
1.npm cache clean --force
2.delete node_modules folder
3.delete package-lock.json file
4.npm install
I am getting some errors while installing node modules on another PC, having the same node version (10.15.0).
Where is the error? I have already deleted the node_modules folder and package-lock.json file and then run npm install command, but this didn't help.
C:\node\inventory_app_web>npm install
npm WARN deprecated #angular/http#7.0.4: Switch to #angular/common/http - see https://angular.io/guide/http
npm WARN deprecated core-js#2.5.7: core-js#<3 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 core-js#2.6.11: core-js#<3 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 istanbul#0.4.5: This module is no longer maintained, try this instead:
npm WARN deprecated npm i nyc
npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.
npm WARN deprecated circular-json#0.5.9: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git#github.com/eligrey/FileSaver.js.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Sohail Ahmad\AppData\Roaming\npm-cache\_logs\2020-01-02T18_09_24_498Z-debug.log
My mistake, I had Git installed, but it was only accessible from Git Bash. reinstalled it with second option and it solved my problem: