Not able to generate Angular app based on running business network - hyperledger-composer

When trying to follow the instructions (https://fabric-composer.github.io/tasks/genapp.html) to generate an Angular app based on a running business network I'm getting a No bower.json present error, using the defaultProfile. It seems to generate a node_modules directory but it's empty, however no angular-app directory is created. I was able to get the app generated by pointing at an existing BNA file as outlined in step 2 of the document but wasn't ideal. Any idea of what mind be going on?
jdockter#ubuntu:~$ yo fabric-composer:angular
WARNING: No configurations found in configuration directory:/home/jdockter/config
WARNING: To disable this warning set SUPPRESS_NO_CONFIG_WARNING in the environment.
Welcome to the Angular2 skeleton app generator
? Do you want to connect to a running Business Network? Yes
? What is the name of the application you wish to generate?: angular-app
? Description of the application: Skeleton Fabric Composer Angular2 project
? Author name: Jon Dockter
? Author email: jdockter#us.ibm.com
? What is the Business Network Identifier?: labor-network-model
? What is the Connection Profile to use? defaultProfile
? Enrollment id: WebAppAdmin
? Enrollment Secret: DJY27pEnl16d
Configuring: angular-app
About to connect to a running business network
I'm all done. Running npm install && bower install for you to install the required dependencies. If this fails, try running the command yourself.
npm WARN enoent ENOENT: no such file or directory, open '/home/jdockter/package.json'
npm WARN jdockter No description
npm WARN jdockter No repository field.
npm WARN jdockter No README data
npm WARN jdockter No license field.
bower ENOENT No bower.json present
Complete

I created this defect to track this:
https://github.com/fabric-composer/fabric-composer/issues/206
Will update here as soon as we know more.
Thanks for the report.

Related

Yarn add - Private package - 404 Not Found

I want to install a private package hosted on an internal Gitlab with Yarn.
So, I configured my .npmrc with this informations :
#mypackage:registry=https://gitlab.intra/api/v4/packages/npm/
//gitlab.intra/api/v4/projects/819/packages/npm/:_authToken=xxxxx
//gitlab.intra/api/v4/packages/npm/:_authToken=xxxxx
always-auth=true
When I attempt to install the package with yarn add #mypackage/lib-node-client, Yarn give me an error :
Trace:
Error: https://gitlab.intra/api/v4/projects/725/packages/npm/#mypackage/lib-node-common/-/#mypackage/lib-node-common-21.7.1.tgz: Request failed "404 Not Found"
at ResponseError.ExtendableBuiltin (/usr/lib/node_modules/yarn/lib/cli.js:696:66)
at new ResponseError (/usr/lib/node_modules/yarn/lib/cli.js:802:124)
at Request.<anonymous> (/usr/lib/node_modules/yarn/lib/cli.js:67062:16)
at Request.emit (node:events:369:20)
at Request.module.exports.Request.onRequestResponse (/usr/lib/node_modules/yarn/lib/cli.js:141640:10)
at ClientRequest.emit (node:events:369:20)
at HTTPParser.parserOnIncomingClient (node:_http_client:646:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:129:17)
at HTTPParser.execute (<anonymous>)
at TLSSocket.socketOnData (node:_http_client:512:22)
So, Yarn can't find the URL : https://gitlab.intra/api/v4/projects/725/packages/npm/#mypackage/lib-node-common/-/#mypackage/lib-node-common-21.7.1.tgz
If I try to get this on my browser, I can download the package...
If anyone can help me please, thank's for all :)
In your .npmrc file, you tell how to connect to GitLab for the project 819. The error is about the project 725. GitLab simply refuse the connexion.
Try with
#mypackage:registry=https://gitlab.intra/api/v4/packages/npm/
//gitlab.intra/api/v4/projects/725/packages/npm/:_authToken=xxxxx
//gitlab.intra/api/v4/projects/819/packages/npm/:_authToken=xxxxx
//gitlab.intra/api/v4/packages/npm/:_authToken=xxxxx
always-auth=true
We had a gitlab private package registry, and was constantly getting this error.
npm i #placeholder/package-name works fine, but yarn add #placeholder/package-name was giving 404 errors.
I tried all possible solutions listed on this thread. At last, there was a section in gitlab on troubleshooting yarn installation [1].
It said,
try adding this to your .npmrc file (and replace <your_token> with your personal access token or deploy token):
//gitlab.example.com/api/v4/projects/:_authToken=<your_token>
Our previous .npmrc looked like this
save-exact=true
unsafe-perm=true
#placeholder:registry=https://gitlab.com/api/v4/packages/npm/
//gitlab.com/api/v4/packages/npm/:_authToken=${PLACEHOLDER_TOKEN}
With the above new line addition, it looked like this,
save-exact=true
unsafe-perm=true
#placeholder:registry=https://gitlab.com/api/v4/packages/npm/
//gitlab.com/api/v4/packages/npm/:_authToken=${PLACEHOLDER_TOKEN}
//gitlab.com/api/v4/projects/:_authToken=${PLACEHOLDER_TOKEN}
With that addition, yarn add #placeholder/package-name worked fine.
[1] https://docs.gitlab.com/ee/user/packages/npm_registry/#error-running-yarn-with-the-package-registry-for-npm-registry
This should be the accepted answer. //gitlab.com/api/v4/projects/:_authToken=${PLACEHOLDER_TOKEN} Was the piece I was missing, which supercedes needing to list each project id as in Joel's answer.

Ignite web console backend not working - Error: Not Found: /signup

I am running Apache Ignite 2.4.0 and configured Ignite web console using following steps Ignite webconsole build and deploy
same has been configured for production mode in Apache server and after successfully starting Backend, when i access web console from front end I am getting below signup error on Backend Node application console. I have tried multiple configurations but none of them seems to work.
Error: Not Found: /signup
at app.use (/recon/Ignite/web-console/backend/app/apiServer.js:64:33)
at Layer.handle [as handle_request] (/recon/Ignite/web-console/backend/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:317:13)
at /recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:335:12)
at next (/recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:275:10)
at SessionStrategy.strategy.pass (/recon/Ignite/web-console/backend/node_modules/passport/lib/middleware/authenticate.js:325:9)
at SessionStrategy.authenticate (/recon/Ignite/web-console/backend/node_modules/passport/lib/strategies/session.js:71:10)
at attempt (/recon/Ignite/web-console/backend/node_modules/passport/lib/middleware/authenticate.js:348:16)
at authenticate (/recon/Ignite/web-console/backend/node_modules/passport/lib/middleware/authenticate.js:349:7)
at Layer.handle [as handle_request] (/recon/Ignite/web-console/backend/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:317:13)
at /recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:335:12)
at next (/recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:275:10)
at initialize (/recon/Ignite/web-console/backend/node_modules/passport/lib/middleware/initialize.js:53:5)
at Layer.handle [as handle_request] (/recon/Ignite/web-console/backend/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:317:13)
at /recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:335:12)
at next (/recon/Ignite/web-console/backend/node_modules/express/lib/router/index.js:275:10)
Snady, ignite-2.5.0 is on vote now and may be released in several days. I think it make sense to use this version.
Requirements: NodeJS 8.x & MongoDB 3.4.x. // Make sure you have this.
So, I downloaded sources and do the following:
In first terminal:
cd {apache-ignite-2.5.0}/modules/web-console/backend
npm install --no-optional
npm start
In second terminal:
cd {apache-ignite-2.5.0}/modules/web-console/frontend
npm install --no-optional
npm start
In browser do: http://localhost:9000/
EDIT:
Will Ignite Web Console in Docker works for your case?
See: https://hub.docker.com/r/apacheignite/web-console-standalone/

Cordova create project

I've got Apache Cordova (latest version as of today) installed on a Windows7 machine and am attempting to create a new project. I'm inside a firewall, so have set proxies (npm config set proxy ..., npm config set https-proxy ... ) to access internet.
using the following command:
cordova create testApp1
I get the following error output:
Creating a new cordova project with name "HelloCordova" and id "io.cordova.hellocordova" at location "C:\Users\sr7\Documents\Cordova\testApp1"
Downloading cordova library for www...
Error: tunneling socket could not be established, cause=Parse Error
at ClientRequest.onError (C:\Users\sr7\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\request\node_modules\tunnel-agent\index.js:168:17)
at ClientRequest.g (events.js:199:16)
at ClientRequest.emit (events.js:107:17)
at Socket.socketOnData (_http_client.js:315:9)
at Socket.emit (events.js:107:17)
at readableAddChunk (_stream_readable.js:163:16)
at Socket.Readable.push (_stream_readable.js:126:10)
at TCP.onread (net.js:529:20)
This would appear to be a proxy issue, however if I do this at home (i.e. no proxy), it still fails although the error is different, i.e.
Creating a new cordova project with name "HelloCordova" and id "io.cordova.hellocordova" at location "C:\Users\sr7\Documents\Cordova\testApp1"
Downloading cordova library for www...
Error: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND wwwcache.sanger.ac.uk
at ClientRequest.onError (C:\Users\sr7\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\request\node_modules\tunnel-agent\index.js:168:17)
at ClientRequest.g (events.js:199:16)
at ClientRequest.emit (events.js:107:17)
at Socket.socketErrorListener (_http_client.js:272:9)
at Socket.emit (events.js:107:17)
at net.js:923:16
at process._tickCallback (node.js:355:11)
It appears to still be trying to find the proxy "wwwcache.sanger.ac.uk", although I've removed the proxy info from npm (they both show null if I do "npm config ls -l").
Can anyone suggest a way to fix this, ideally within a firewall. Thanks.
Being behind a proxy, I've encountered the same issue with latest version of nodejs.
To fix it, download latest version of tunnel-agent here
and put it in the npm folder of your installed cordova-lib :
.\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\request\node_modules\tunnel-agent
Source of information : https://issues.apache.org/jira/browse/CB-8662

Skeleton list isn't available with DocPad run command

When I use the command d:\path>docpad run, I have only one choice with Skeleton because I get an error when DocPad tried to updating exchange.
The output of this command:
D:\path>docpad run
info: Welcome to DocPad v6.69.1 (global installation: C:\Users\v20100v\AppData\Roaming\npm\node_modules\docpad)
notice: If everyone who saw this message donated $1/week, maintaining DocPad would become sustainable: http://docpad.org/donate
info: Contribute: http://docpad.org/docs/contribute
info: Plugins:
info: Environment: development
info: Updating the exchange...
This can take a moment...
notice: An error occured fetching the exchange data, this is okay, but not all skeletons will be available to you undefined { code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect' }
info: You are about to create your new project inside your current directory. Below is a list of skeletons to bootstrap
your new project:
1. No Skeleton
Prefer to start from scratch? You can get started without any skeleton if you wish
Which skeleton will you use? [1-1]
1. No Skeleton
>
Information about my configuration :
-> Windows 7
-> node v0.10.13
-> npm v1.3.2
-> docpad v6.69.1
May be a proxy problem, but node and npm work fine with my configuration proxy.
Any idea how to fix this?

Deploy meteor/meteorite 0.8.3 to heroku

I just updated my app to meteor 0.8.3. Locally it runs without problems. But when I try to push it to heroku, I'll get the following error:
Building meteor bundle
simple-schema: updating npm dependencies -- string...
iron-router: updating npm dependencies -- connect...
lodash: updating npm dependencies -- lodash...
Errors prevented bundling:
While building the application:
error: no such package: 'accounts-ui-bootstrap-3'
error: no such package: 'accounts-entry'
While building package `iron-dynamic-template`:
error: no such package: 'blaze'
tar: /app/tmp/cache/bundle.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Exiting with failure status due to previous errors
! Push rejected, failed to compile Meteor app app
For deployment, I used the buildpack of oortcloud. This worked proper in the past. https://github.com/oortcloud/heroku-buildpack-meteorite
I'm most confused by the earlier log entries before the error happens. Here it says that Meteor 0.8.1.1 is being installed. A couple of lines after that it confirms that Meteor 0.8.3 has been installed. I'm pretty sure that this is the same issue like this. https://github.com/EventedMind/iron-dynamic-template/issues/2
Installing Meteor 0.8.1.1
* 'meteor' build tool (vers
* 'meteor' build tool (version 43b8566b9f)
* Package updates: accounts-base accounts-meteor-developer accounts-oauth
accounts-password accounts-ui accounts-ui-unstyled amplify appcache
application-configuration autoupdate browser-policy browser-policy-common
browser-policy-content check coffeescript coffeescript-test-helper ctl
ctl-helper deps ejson email facebook facts follower-livedata force-ssl github
google html-tools htmljs http jquery-waypoints js-analyze less livedata
localstorage logging meetup meteor meteor-developer minifiers minimongo
mongo-livedata oauth oauth-encryption oauth1 oauth2 observe-sequence
reactive-dict routepolicy session showdown spacebars spacebars-compiler
spacebars-tests spiderable srp star-translate stylus templating test-helpers
test-in-browser tinytest twitter ui underscore-tests webapp weibo
Meteor 0.8.3 has been installed in your home directory (~/.meteor).
Now you need to do one of the following:
(1) Add ~/.meteor to your path, or
(2) Run this command as root:
cp ~/.meteor/tools/latest/launch-meteor /usr/bin/meteor
Then to get started, take a look at 'meteor --help' or see the docs at
docs.meteor.com.
I also tried to create a new meteorite app to get rid of dangling dependencies. But without success!
What can I do? Is there a chance to debug the push/deploy on the heroku server?
The outdated file .meteor/release caused the problem:
git heroku push master fetches the files to deploy from the origin git repository. It doesn't care about local, unstaged files. Somehow the file .meteor/release has not been pushed to the origin repository. So during the installation routine at heroku the meteor version was 0.8.1.1 and not 0.8.3.
Solution to avoid this problem:
Check/Add the files .meteor/release and .meteor/packages to your origin git repo
Test only what's in your origin repo before you deploy it. Use git pull

Resources