while running bootstrap-flight-search-form-part-2 using command
npm run start
it gives error like
To run the project locally do the following steps:
Clone the repository
Install the dependencies with
npm install
Add your API key and API secret at app.js
const amadeus = new Amadeus({
clientId: 'YOUR_API_KEY',
clientSecret: 'YOUR_API_SECRET'
});
Start the server with
npm run start
Related
I tried to install Pupilfirst LMS, I had difficulty in step
Compile Rescript Code: yarn run re: build
Output: Usage Error: could't find a script named "re: build".
And I also have difficulty in step
Run Webpack Dev Server: yarn run wds
Output: Usage Error: could't find a script named "wds".
is there any solution?
https://docs.pupilfirst.com/developers/development_setup
There shouldn't be a space between re: and build: yarn run re:build.
Also, when running a yarn run script_name command, make sure that your current directory contains a package.json file where the script script_name is defined.
In case of pupilfirst this file is in the root: https://github.com/pupilfirst/pupilfirst/blob/e41ffb8a57f4c59f7927056af324b5c283fb0038/package.json
I am biginner in block chain development. I succesfully run ./startFabric.sh and ./createPeerAdminCard.sh .Then i succesfully run two command as follow below.
composer runtime install -c PeerAdmin#byfn-network-org1-only -n trade-network
composer runtime install -c PeerAdmin#byfn-network-org2-only -n trade-network
Then i tried to run
composer identity request -c PeerAdmin#byfn-network-org1-only -u admin -s adminpw -d alice
But i got error like the following
Error: failed to request identity. Error trying to enroll user and return certificates. Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054]
I tried many time to kill all process in docker and remove .composer file from home directory. But always showing the same error message.
Please help me as possible
Os: Ubuntu 16.04
Fabric vertion:1.0.4
Composer vertion:0.16.6
Thanks..
This error "Failed to import the business network card Connection profile has no x-type property defined." means that a v0.20 client can't/won't import a card from an earlier version (probably v0.16).
I think maybe you are running the wrong version of createPeerAdminCard.sh script and it is trying to create and import an 'old' card.
With Composer v0.20 you need to get 'new' copies of the fabric-development-servers scripts which work with Fabric 1.2.
So I would suggest running the following:
run teardownAllDocker.sh script
remove the fabric-dev-server folder (might be fabric-tools if old)
remove the ~/.composer folder
follow the install doc from Step 4 . - make sure to export FABRIC_VERSION=hlfv12 - this is what makes sure you get Fabric 1.2.
This is difficult to help ...
The first 2 scripts you have run (./startFabric.sh and ./createPeerAdminCard.sh) are for a basic development Fabric.
The next 2 commands look like they are from the Multi-Org tutorial which uses a different Fabric and has different cards and crypto material.
Unless there is a particular reason for using an old version of Composer, I would suggest using Composer v0.20, which requires Fabric 1.2.
If you are a beginner I would suggest working with the Developer Tutorial to start with.
if you are using a default file (e.g. connection.json, env.json, etc.) to hold your base connnection profile, simply change the "type" term in that default file to "x-type"
In converting from v0.16 to v0.20, you must first remove the v0.16 composer tools from your system, then install the v0.20 version.
To remove v0.16.6:
npm uninstall -g composer-cli
npm uninstall -g generator-hyperledger-composer
npm uninstall -g composer-rest-server
To install V0.20.2:
npm install -g --python=python2.7 composer-cli#0.20.2
npm install -g --python=python2.7 generator-hyperledger-composer#0.20.2
npm install -g --python=python2.7 composer-rest-server#0.20.2
npm install -g --python=python2.7 yo
If you're running nodejs, then you also have to update both package.json files (network/package/json as well as your {base folder}package.json) from 0.16.x to ^0.20.2
The reason for error is Missing of Certificate Authorities(CA). I Just up my CA server. Now Working perfectly.
I am getting a Invalid Protocol : null error when I run my postman collection via Newman.
Steps I have followed
Installed node js
Configured npm registry using
npm config set registry
Configured npm proxy using
npm config set proxy
4.installed Newman using npm install -g Newman
Tried to run a postman collection using
newman run
In the result I am getting an error saying
Invalid Protocol : null
Try to writing these commands in your console with your password and user of Windows:
**set HTTPS_proxy=youruser:yourpassword#ip of the proxy:port of the proxy
set HTTP_proxy=youuser:yourpassword#ip of the proxy:port of the proxy**
I hope it helps.
I am trying to use the composer-rest-server package after completing the Fabric Composer quick start, but I failed.
Please give me a hint.
The composer-rest-server package was successfully installed.
npm install -g composer-rest-server
Composer-rest-server started.
composer-rest-server
I was asked to enter simple information about the business network.
After that, I failed to load the connector module 'composer-connector-hlf'.
? Enter your Fabric Connection Profile Name: defaultProfile 
? Enter your Business Network Identifier : digitalproperty-network
? Enter your Fabric username : WebAppAdmin
? Enter your secret: DJY27pEnl16d
? Specify if you want namespaces in the generated REST API: always use namespace
s
? Specify if you want the generated REST API to be secured: Yes
To restart the REST server using the same options, issue the following command:
composer-rest-server -p defaultProfile -n digitalproperty-network -i WebAppAdmin -s DJY27pEnl16d -N always -S true
Discovering types from business network definition ...
Connection fails: Error: Failed to load connector module "composer-connector-hlf" for connection profile "defaultProfile"
It will be retried for the next request.
Error: Failed to load connector module "composer-connector-hlf" for connection profile "defaultProfile"
at connectionProfileStore.load.then.e (/home/user1/.nvm/versions/node/v6.9.5/lib/node_modules/composer-rest-server/node_modules/composer-common/lib/connectionprofilemanager.js:148:27)
How can I solve the problem?
Your .composer-connection-profiles is not set to defaultprofile.
Check your root folder and there .composer-connection-profiles folder must be present.
Inside that folder the composer profiles will be there (if your defaultprofile is made, then there will be a folder named defaultprofile), check the connection.json inside the defaultprofile folder.
If there is any other folder with different name, use that as your profile. Or you can specifically define the folder defaultprofile and write connection.json with connection details.
Which version of npm are you using? I faced similar issue on ubuntu 16.4. When I retinstall evberything with lower version of npm it worked perfectly.
npm version when things worked:
npm --version
3.10.10
when I was getting problem as you have mentioned it was 5.x
Does your grpc module has grpc_node.node files?
It's in the composer-cli module.
In my environment
/usr/local/lib/node_modules/composer-cli/node_modules/grpc/src/node/extension_binary/grpc_node.node
if you use sudo, you may need to add --unsafe-perm option.
Like: sudo npm install -g --unsafe-perm composer-cli
I am having issues deploying my elastic beanstalk rails 4 + ember cli app. I have a rails application and within the root I have a folder called 'frontend' which contains my ember app generated by ember CLI Rails.
My configuration:
64bit Amazon Linux 2015.03 v1.3.1 running Ruby 2.1 (Puma)
I encounter the following error from my activity log after I run eb deploy:
At cursory, I get this
ERROR: Instance: i-25c139e7 Module: AWSEBAutoScalingGroup ConfigSet: null Command failed on instance. Return code: 1 Output: (TRUNCATED)...mber-cli-rails.rb:58:in `compile!'
Looking into /var/log/eb-activity.log
I first get a lot of
npm ERR! Error: Attempt to unlock X, which hasn't been locked
followed by
npm ERR! System Linux 3.14.35-28.38.amzn1.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /var/app/ondeck/frontend
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/app/ondeck/frontend/npm-debug.log
npm ERR! not ok code 0
rake aborted!
EmberCLI Rails requires your Ember app to have an addon.
From within your EmberCLI directory please run:
$ npm install --save-dev ember-cli-rails-addon#0.0.11
in you Ember application root: /var/app/ondeck/frontend
Tasks: TOP => assets:precompile => ember:compile
(See full trace by running task with --trace) (Executor::NonZeroExitStatus)
So I ssh into the directory indicated and run npm install, which also leaves me with a lot of errors regarding authorization. When I run with via sudo, the modules install correctly, but when I redeploy my app, it gives me the exact same error.
I have tried sudo NPM install and chown -R node_modules webapp so that the node_modules folder can be accessed by the webapp group with no success.
I hate long answers, but this scenario is quite complicated.
As mentioned in the comments above, it was discovered that the home directory for the webapp user needed to be created (/home/webapp). Once this directory is created, the node package manager (npm) can execute without error. Because AWSEB environments can scale, SSH'ing into the EB host and performing one-off installations of packages and modules will not work in the long run. Essentially the answer boils down to the following logical steps:
Install git on the application server because bower needs it.
Create the home directory of the webapp user at /home/webapp.
Install bower globally using npm.
Invoke the npm install of your ember app.
Invoke bower install for your ember app.
To fix this I went ahead and created several .ebextensions customization files that are executed during an eb deploy. Here they are in order:
.ebextensions/00_option_settings.config - sets some EB options; for example the timeout length for command executions performed during an eb deploy. In this case all commands will timeout after 1200 seconds.
option_settings:
- namespace: 'aws:elasticbeanstalk:command'
option_name: 'Timeout'
value: '1200'
.ebextensions/01_packages.config - can install packages through yum and make them available to your eb instance. In this case I use yum to install git, this will later be used by bower.
packages:
yum:
git: []
.ebextensions/02_commands.config - allows you to run OS commands prior to unpacking the application that was uploaded through eb deploy. This part of the answer satisfies the main theme of this question: In my particular case, I need to create the /home/webapp directory, make sure it is owned by the webapp user, and also has 700 permissions. Lastly, I ensure that bower is installed globally as it will be needed by my ember application.
commands:
01_mkdir_webapp_dir:
# use the test directive to create the directory
# if the mkdir command fails the rest of this directive is ignored
test: 'mkdir /home/webapp'
command: 'ls -la /home/webapp'
02_chown_webapp_dir:
command: 'chown webapp:webapp /home/webapp'
03_chmod_webapp_dir:
command: 'chmod 700 /home/webapp'
04_install_bower_global:
command: 'npm install -g bower'
.ebextensions/03_container_commands.config - runs OS command after the application has been unpacked. NOTE: My ember app lives in the frontend directory of application source code. In order to install the npm and bower dependencies, the npm install and bower install commands need to be executed from the frontend directory. It is also worth mentioning that the bower-install command needs the --allow-root flag in order to succeed as the AWS user executing these commands has elevated privileges.
container_commands:
01_npm_install:
# set the current working directory to fully-qualified frontend
cwd: '/var/app/ondeck/frontend/'
command: 'npm install'
leader_only: 'false'
02_bower_install:
# set the current working directory to fully-qualified frontend
cwd: '/var/app/ondeck/frontend/'
command: 'bower --allow-root install'
leader_only: 'false'
03_seeddb:
# seed my database (has nothing to do with this answer)
command: 'rake db:seed_fu'
leader_only: 'true'