I am new on protractor platform and I tried to install and run the protractor locally on window, but I had no luck yet. Can anybody please tell me the exact step? I am able to install and run it globally.
For you
Create an empty folder as project base dir
Open a terminal and cd into the new folder
Execute npm init to generate package.json
Execute npm install -S protractor to install protractor locally and add it into project's dependencies. (you can check protractor will appear in package.json)
Prepare test script
Commit test script with package.json together
For others who want to run you code locally,
Clone your code to local
Open terminal and cd project base dir
Execute npm install to install dependencies to local
Execute protractor cli to execute test
Related
I have to run a script (from my package.json file) before I run yarn install. The script sets up the configuration for a private package. In my .yarnrc.yml, I have nodeLinker: node-modules (and I want to keep it that way because I get other errors if I remove it).
The problem is that when I run yarn run myscript I have the following error:
Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)
$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] <scriptName> ...
But I can't run install before the script since I have private packages that need the script before it gets installed.
I just switched from NPM to Yarn 3.2.0. With NPM, I was able to run the script before installing packages.
I am trying to integrate cypress to the bitbucket pipeline. And I am following the official documentation:
- step:
script:
# install dependencies
- npm ci
# run Cypress tests
- npm run e2e (env variables here)
I launch the container locally as follows:
docker run -v `pwd`:/mycode -it imagename /bin/sh
cd /mycode
and I run the steps in the script:
/mycode# npm ci; npm run e2e (env variables here)
But I get the following error:
/root/.cache/Cypress/8.2.0/Cypress/Cypress: error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory
I ran apt-get install xvfb libgtk2.0-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2, as per documentation when I got libgtk2.0-0 missing dependency and it threw the next one.
I also have added :nvm install "lts/*" --reinstall-packages-from="$(nvm current)" as a step to update node to the latest version and match cypress requirements,
but is there any general practice on how to integrate cypress in an existing project's pipeline and to work around these library issues?
Is the fix just to install the library or is there a better integration practice and something I'm missing?
You can actually use an official cypress image only for the step where you want to run the tests. You can choose the version which suits you the best.
- step:
name: run tests
image: cypress/browsers:node12.18.3-chrome87-ff82
script:
# install dependencies
- npm ci
# run Cypress tests
- npm run e2e (env variables here)
We have gradle and npm installed on Linux box inside jenkins container where I am able to build through gulp build command but when I run
"gradle build"
Execution failed for task ':themes:portlet-layout:-portal-layouttpl:npmInstall'.
A problem occurred starting process 'command '/var/jenkins/workspace/Portal_RTC/liferay-workspace/build/node/node..
,I have got gradle npm installed and PATH set.I can say this running by npm --v , node --version.
I want to know what configuration I am missing to make it work.Also everytime I checked out the code I need to install modules again specially gulp else it start download from webhttp://mirrors.lax.liferay.com/nodejs.org/dist/v8.10.0/node-v8.10.0-linux-x64.tar.gz
when I define gradle-gulp plugin in build.gradle it says node is already installed. The imp things is the whole setup work on Developer machine on windows. Though they have copied node_modules folder from nodeJs home to their individual projects.
thanks
I am using the instructions given on their site for MacOS- https://ipfs.io/docs/install/#installing-with-ipfs-update
[tutorial][1]
To build demo, clone this repo and run the following command:
$ cd contracts
$ npm install
Running the demo
To run demo, first run testrpc by running:
$ testrpc
Then compile and deploy the solidity contracts:
$ truffle compile
$ truffle migrate
Run an instance of IPFS to enable uploads:
$ ipfs daemon
Finally to build website, run:
$ npm run dev
I reached this last step (npm run dev) and I got an error message saying "npm missing scripts dev"
I am in the contracts directory specified, and installed everything there properly I believe. However, I don't see any dev script in the json package(s) which I believe could be being referenced using the npm run dev command. May this be the problem?
Here are the files wihin the folder contracts-master
app
index.html
javascripts
stylesheets
contracts
**ethpm.json** This one?
img
LICENSE
Lockup.sol
migrations
**package.json** Or this one?
Readme.md
scripts
coverage.sh
coveralls.sh
install.sh
test.sh
truffle.js
Any help / suggestions / learning resources would be appreciated.
Thanks for your time,
Elias
Your error is not because of ipfs. You are running dev mode but error saying that you don't have any scripts dev.If you are deploying smart contracts then you don't need ipfs demon. check package.json
"scripts": {
"dev": "command to run service"
}
Your package.json don't have dev scripts recheck package.json
I am using TeamCity as my CI server(mac).I am trying to build a web project. When I use grunt serve or grunt buildproduction after changing directory to the cloned folder,it's working perfectly fine.But when I do this via TeamCity server it is giving an error You need to have Ruby and Compass installed and in your system PATH for this task to work and gets aborted due to warnings. Ruby and Compass is already installed in the server.Please help me on this.
rm -rf $(pwd)/node_modules/*
rm -rf $(pwd)/bower_components/*
npm cache clear
npm install
npm install bower
npm install grunt-ftp-push --save-dev
bower install
grunt buildproduction
This is the Command Line buildstep which I used in Teamcity..
I would say you probably use a different user or the shell environment is different (interactive vs non-interactive) when you run these commands manually and when it runs through TC it can't find those packages in the environment/PATH