I spun up an Ubuntu server on AWS and everything is working as expected with Hyperledger Composer except when I try to compile an angular-app using "npm start" after creating the app via "yo hyperledger-composer:angular". Its taking forever to compile at 92% chunk asset optimization. When I do the same exact steps on my local mac laptop, no issues at all. Must be some sort of version issue with something in the node_modules? Any thoughts or suggestions?
probably because your AWS VM instance is behind a proxy - ie its network interface doesn't know how to route to www and specifically to https://registry.npmjs.org/ for example as its trying to install packages when you do an npm install
Related
I've installed Laravel Homestead recently, but when I try to run npm install it gets stuck at building the babel package.
Line where it get's stuck: build:#babel/helper-validator-option: sill linkStuff #babel/helper-validator-option#7.12.11 has /home/vagrant/code/testsite/node_modules as its parent node_modules
Installing a single package like VueJS works fine.
I'm using NFS on Windows right now for syncing the folders.
Versions:
Vagrant: 2.2.14
Homestead: 10.1.1
Windows 10
Kind Regards,
Corné
If you are using your Office wifi. Your office Network is blocking your proxy. That is why you are stuck.
Switch to another Wifi and maybe connect your VPN(if you are doing it on your office computer)
I am about to finally deploy my laravel app to shared host soon, using ssh. My question here is: in local enviroment I installed all npm dependencies (npm install), to compile all vue.js scripts.
What i already know is that: after uploading everything to shared host I should run "composer install" to install composer dependencies and edit .env.
But should I also run "npm install" if I already have my app.js compiled on local enviroment?
Thanks,
PS
You actually probably don't have npm on a shared server. At least with HostGator, which is where I have experience, it wasn't possible - in which case - you would need to run and compile npm locally before pushing to the server.
Yes as per my experience with Hostinger it is not possible to install NODE, and NPM via a command on the server. Because it is not a private server and it is already given us our requirements setup during server selection. So you can do this by pushing your js assets with git and pulling on the server to get js.
I have installed latest Hyperledger Composer 0.19. Now with new version the command "composer network update" is not available. Now I am not sure how to redeploy changes in .BNA file to the network. Can someone explain how "Composer network install" command can be used to redeploy incremental changes to .BNA file to the network
This was changed as part of the native fabric deployment support added to Composer in 0.19.0. From the 0.19.0 release notes:
This release includes a fundamental change in the way that business
networks are deployed. Business networks are now deployed within
Hyperledger Fabric 'as chaincode' meaning that the business network
(rather than Composer runtime) can be agreed by all parties and
signed, using a similar management model to non-Composer chaincode. As
a result of this, the deployment and update process has changed.
You need to use the new composer network upgrade command instead:
The commands to upgrade (update) a business network have changed and
are now:
composer network install
composer network upgrade
The following commands are no longer valid:
composer runtime install
composer network deploy
composer network update
composer network undeploy
You are correct that the commands have changed for v0.19 of composer.
For each release there is a releases document which covers the changes - so checking these when you upgrade is good.
When you first deploy your network you use the commands:
composer network install and
composer network start
and there are examples in the https://hyperledger.github.io/composer/latest/tutorials/developer-tutorial.
When you subsequently want to deploy a new version you use the commands:
composer network start and
composer network upgrade
There are examples of these in the Queries tutorial.
These new commands for Composer bring it more into line with the underlying Fabric now that it can use Native NodeJS chaincode.
How to Start Playground in the developer environment? Please provide the document.
I am following the developer installation guide: https://hyperledger.github.io/composer/tutorials/developer-guide.html
If you want to run the Playground locally, install the composer-playground using the following command.
npm install -g composer-playground
I don't see how to start the playground after that.
Thank you, Christo. I am able to install now. I installed playground first and installed all other composer components(npm install -g composer-cli,npm install -g generator-hyper ledger-composer,npm install -g composer-rest-server). Problem is now, I am not able to deploy .bna using admin credentials for composer-rest-server. Next tried deploying using the PeerAdmin for composer-rest-server, which was successful.
Now the issue is not allowing the asset creation (Throwing, the asset cannot be created via PeerAdmin). What is the proper way to set up the developer environment plus playground in the same environment?
The instructions are in the tutorial documentation. Basically, you need to install and start the Hyperledger Fabric network, configured for Composer. It will launch the playground in your favorite browser.
After the first time you run it, you can start/stop the network with composer.sh to re-start, and composer.sh stop (from the directory into which you installed fabric-tools) to shutdown all the Fabric and Composer docker images. Once started, you can open http://localhost:8080/login to start the playground.
I've created a site using foundation sites. It's using the standard install using the Foundation CLI.
I've got the site running locally using foundation watch. When I push this to Heroku the build succeeds in the Heroku console but when I visit the site in a browser I only get an application error.
Heroku support has said I should be using $PORT in my startup script but I don't know where to configure this. This also seems strange as it's the first install.
Has anyone had similar problems?
Here are some of the issue i find in your app.
Firstly heroku is not going to install any of your devDependencies, so make sure all dependencies required to build are in dependencies list.
Heroku searches for Procfile, which is used to launch app. If it doesnt find that, it will go with standard procedure.
In your case
It runs npm start. Which calls gulp to run build, server and watch( which is not necessary ).
Second heroku assign PORT number dynamically. But your server task binds a static port number 8000 from config.yml. So that may fail your app.
You dont need to use foundation watch in heroku as watch mode of files are not needed
You are required to run a server and server your files
My advice is to use expressJS server( because i have used it ) after your done building your app with gulp
In your start script(package.json), you can write something like
"scripts": {
"start": "gulp && node server.js",
"build": "gulp build --production"
}
where server.js is expressjs server file. here's an example how you can write it.
Hope your problem will have less issues now.
Not to say about your github repo, but here are some points that might helpfull for you as well as for your clients/users or anybody.
Why you have uploaded all node_modules and bower_components to github. When you have their respective json file, anyone can do npm install or bower install to download all required packages.
Uploading node_modules and bower_components will be a headache for you as your push and clone size increases.