You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get a new Fabric 2.2 installation set up and going and we've run into some issues trying to run conv-rest-api.
We currently have a Fabric 1.0 ledger that we need to upgrade. We thought it would be easier to just set up 2.2 from scratch and then repopulate our ledger. So, we installed the latest version of Convector and I followed the tutorial for configuring our new project, "sr2". All went well until I got past step where I created the api.json to expose my smart contract methods. I went to create the API with conv-rest-api and I got errors.
The command I executed was: conv-rest-api generate api -c sr2 -p sr2 -f ./sr2.config.json
NOTE: I had to add a new parameter, "-p sr2", not listed in the tutorial but conv-rest-api threw an error when run without it.
I got the following errors:
[error log]
in generateApi in command.ts chaincode=sr2
in generateApi in command.ts chaincodeConfigFile=./sr2.config.json
generating stub..
removing previously generated app (packages/sr2-app)
generating stub folder
/usr/lib/node_modules/@worldsibu/convector-rest-api/templates_scripts/generate_api_template.bash: line 5: yo: command not found
Exiting packages folder...
/home/hyper2/sr2
Compiling new app...
lerna notice cli v3.13.4
lerna info filter [ 'sr2-app' ]
lerna ERR! EFILTER No packages remain after filtering [ 'sr2-app' ]
Adding dependencies...
lerna notice cli v3.13.4
lerna info filter [ 'sr2-app' ]
lerna ERR! EFILTER No packages remain after filtering [ 'sr2-app' ]
lerna notice cli v3.13.4
lerna info filter [ 'sr2-app' ]
lerna ERR! EFILTER No packages remain after filtering [ 'sr2-app' ]
lerna notice cli v3.13.4
lerna info filter [ 'sr2-app' ]
lerna ERR! EFILTER No packages remain after filtering [ 'sr2-app' ]
lerna notice cli v3.13.4
lerna info filter [ 'sr2-app' ]
lerna ERR! EFILTER No packages remain after filtering [ 'sr2-app' ]
lerna notice cli v3.13.4
lerna info filter [ 'sr2-app' ]
lerna ERR! EFILTER No packages remain after filtering [ 'sr2-app' ]
lerna notice cli v3.13.4
lerna info filter [ 'sr2-app' ]
lerna ERR! EFILTER No packages remain after filtering [ 'sr2-app' ]
Bootstrapping...
lerna notice cli v3.13.4
lerna info Bootstrapping 1 package
lerna info Installing external dependencies
lerna info hoist Installing hoisted dependencies into root
lerna info hoist Finished bootstrapping root
lerna info hoist Pruning hoisted dependencies
lerna info hoist Finished pruning hoisted dependencies
lerna info Symlinking packages and binaries
lerna info lifecycle [email protected]~prepare: [email protected]
[email protected] prepare /home/hyper2/sr2/packages/sr2-cc
npm run build
TypeError: Cannot read property 'length' of undefined
at EnvModel.get [as selectedApiConfig] (/usr/lib/node_modules/@worldsibu/convector-rest-api/dist/models/env.smart-model.js:51:67)
at EnvModel. (/usr/lib/node_modules/@worldsibu/convector-rest-api/dist/models/env.smart-model.js:25:50)
at step (/usr/lib/node_modules/@worldsibu/convector-rest-api/node_modules/tslib/tslib.js:141:27)
at Object.next (/usr/lib/node_modules/@worldsibu/convector-rest-api/node_modules/tslib/tslib.js:122:57)
at /usr/lib/node_modules/@worldsibu/convector-rest-api/node_modules/tslib/tslib.js:115:75
at new Promise ()
at Object.__awaiter (/usr/lib/node_modules/@worldsibu/convector-rest-api/node_modules/tslib/tslib.js:111:16)
at EnvModel.save (/usr/lib/node_modules/@worldsibu/convector-rest-api/dist/models/env.smart-model.js:21:24)
at ApiGenerator. (/usr/lib/node_modules/@worldsibu/convector-rest-api/dist/apiGenerator.js:57:49)
at step (/usr/lib/node_modules/@worldsibu/convector-rest-api/node_modules/tslib/tslib.js:141:27)
[end of error log]
First off, I assume that I may need to install Yeoman but figured that it probably should have installed automatically as a dependency so I ran "npm i" from my project root. This generated another set of error messages:
[error log]
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '^10.15.3 || ^12.15.0', npm: '^6.4.1' },
npm WARN EBADENGINE current: { node: 'v16.3.0', npm: '7.15.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '^10.15.3 || ^12.15.0', npm: ' ^6.4.1' },
npm WARN EBADENGINE current: { node: 'v16.3.0', npm: '7.15.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '^8.17.0', npm: '^6.13.4' },
npm WARN EBADENGINE current: { node: 'v16.3.0', npm: '7.15.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '^8.9.0', npm: '^5.5.1' },
npm WARN EBADENGINE current: { node: 'v16.3.0', npm: '7.15.1' }
npm WARN EBADENGINE }
Hello,
I am trying to get a new Fabric 2.2 installation set up and going and we've run into some issues trying to run conv-rest-api.
We currently have a Fabric 1.0 ledger that we need to upgrade. We thought it would be easier to just set up 2.2 from scratch and then repopulate our ledger. So, we installed the latest version of Convector and I followed the tutorial for configuring our new project, "sr2". All went well until I got past step where I created the api.json to expose my smart contract methods. I went to create the API with conv-rest-api and I got errors.
The command I executed was: conv-rest-api generate api -c sr2 -p sr2 -f ./sr2.config.json
NOTE: I had to add a new parameter, "-p sr2", not listed in the tutorial but conv-rest-api threw an error when run without it.
I got the following errors:
[error log]
in generateApi in command.ts chaincode=sr2
in generateApi in command.ts chaincodeConfigFile=./sr2.config.json
generating stub..
removing previously generated app (packages/sr2-app)
generating stub folder
/usr/lib/node_modules/@worldsibu/convector-rest-api/templates_scripts/generate_api_template.bash: line 5: yo: command not found
Exiting packages folder...
/home/hyper2/sr2
Compiling new app...
lerna notice cli v3.13.4
lerna info filter [ 'sr2-app' ]
lerna ERR! EFILTER No packages remain after filtering [ 'sr2-app' ]
Adding dependencies...
lerna notice cli v3.13.4
lerna info filter [ 'sr2-app' ]
lerna ERR! EFILTER No packages remain after filtering [ 'sr2-app' ]
lerna notice cli v3.13.4
lerna info filter [ 'sr2-app' ]
lerna ERR! EFILTER No packages remain after filtering [ 'sr2-app' ]
lerna notice cli v3.13.4
lerna info filter [ 'sr2-app' ]
lerna ERR! EFILTER No packages remain after filtering [ 'sr2-app' ]
lerna notice cli v3.13.4
lerna info filter [ 'sr2-app' ]
lerna ERR! EFILTER No packages remain after filtering [ 'sr2-app' ]
lerna notice cli v3.13.4
lerna info filter [ 'sr2-app' ]
lerna ERR! EFILTER No packages remain after filtering [ 'sr2-app' ]
lerna notice cli v3.13.4
lerna info filter [ 'sr2-app' ]
lerna ERR! EFILTER No packages remain after filtering [ 'sr2-app' ]
Bootstrapping...
lerna notice cli v3.13.4
lerna info Bootstrapping 1 package
lerna info Installing external dependencies
lerna info hoist Installing hoisted dependencies into root
lerna info hoist Finished bootstrapping root
lerna info hoist Pruning hoisted dependencies
lerna info hoist Finished pruning hoisted dependencies
lerna info Symlinking packages and binaries
lerna info lifecycle [email protected]~prepare: [email protected]
lerna success Bootstrapped 1 package
Adding chaincode(s)...
lerna notice cli v3.13.4
lerna info filter [ 'sr2-app' ]
lerna ERR! EFILTER No packages remain after filtering [ 'sr2-app' ]
/usr/lib/node_modules/@worldsibu/convector-rest-api/dist/models/env.smart-model.js:51
for (var _i = 0, _a = apiConfig.environments; _i < _a.length; _i++) {
^
TypeError: Cannot read property 'length' of undefined
at EnvModel.get [as selectedApiConfig] (/usr/lib/node_modules/@worldsibu/convector-rest-api/dist/models/env.smart-model.js:51:67)
at EnvModel. (/usr/lib/node_modules/@worldsibu/convector-rest-api/dist/models/env.smart-model.js:25:50)
at step (/usr/lib/node_modules/@worldsibu/convector-rest-api/node_modules/tslib/tslib.js:141:27)
at Object.next (/usr/lib/node_modules/@worldsibu/convector-rest-api/node_modules/tslib/tslib.js:122:57)
at /usr/lib/node_modules/@worldsibu/convector-rest-api/node_modules/tslib/tslib.js:115:75
at new Promise ()
at Object.__awaiter (/usr/lib/node_modules/@worldsibu/convector-rest-api/node_modules/tslib/tslib.js:111:16)
at EnvModel.save (/usr/lib/node_modules/@worldsibu/convector-rest-api/dist/models/env.smart-model.js:21:24)
at ApiGenerator. (/usr/lib/node_modules/@worldsibu/convector-rest-api/dist/apiGenerator.js:57:49)
at step (/usr/lib/node_modules/@worldsibu/convector-rest-api/node_modules/tslib/tslib.js:141:27)
[end of error log]
First off, I assume that I may need to install Yeoman but figured that it probably should have installed automatically as a dependency so I ran "npm i" from my project root. This generated another set of error messages:
[error log]
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '^10.15.3 || ^12.15.0', npm: '^6.4.1' },
npm WARN EBADENGINE current: { node: 'v16.3.0', npm: '7.15.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '^10.15.3 || ^12.15.0', npm: ' ^6.4.1' },
npm WARN EBADENGINE current: { node: 'v16.3.0', npm: '7.15.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '^8.17.0', npm: '^6.13.4' },
npm WARN EBADENGINE current: { node: 'v16.3.0', npm: '7.15.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '^8.9.0', npm: '^5.5.1' },
npm WARN EBADENGINE current: { node: 'v16.3.0', npm: '7.15.1' }
npm WARN EBADENGINE }
lerna notice cli v3.13.4
lerna info Bootstrapping 1 package
lerna info Installing external dependencies
lerna info hoist Installing hoisted dependencies into root
lerna info hoist Finished bootstrapping root
lerna info hoist Pruning hoisted dependencies
lerna info hoist Finished pruning hoisted dependencies
lerna info Symlinking packages and binaries
lerna info lifecycle [email protected]~prepare: [email protected]
lerna success Bootstrapped 1 package
removed 24 packages, and audited 1150 packages in 24s
[end of error log]
I currently have Node v16.3.0 and npm v7.15.1 installed.
Any ideas or suggestions? TIA
The text was updated successfully, but these errors were encountered: