Getting "Loading Botium plugin from directline3" even after installing directline3 - direct-line-botframework

I followed the steps at https://github.com/codeforequity-at/botium-connector-directline3
> npm install -g botium-cli
> npm install -g botium-connector-directline3
> botium-cli init
> botium-cli run
But, running
botium-cli run --config path/to/botium.json --convos give_me_a_picture.convo.txt gives me this
Error: Loading Botium Plugin failed.
Loading Botium plugin from directline3 failed - Cannot find module 'directline3'
Loading Botium plugin botium-connector-directline3 failed, try "npm install botium-connector-directline3" - Cannot find module 'botium-core'
at tryLoadPlugin (/Users/<user>/.nvm/versions/node/v10.13.0/lib/node_modules/botium-cli/node_modules/botium-core/src/containers/plugins/index.js:133:9)
at PluginConnectorContainer.Validate (/Users/<user>/.nvm/versions/node/v10.13.0/lib/node_modules/botium-cli/node_modules/botium-core/src/containers/PluginConnectorContainer.js:14:27)
Is this an issue with the node version 10.13.0 that I have?
My botium.json
"botium": {
"Capabilities": {
"PROJECTNAME": "My Botium Project",
"CONTAINERMODE": "directline3",
"DIRECTLINE3_SECRET": "<secret>",
"DIRECTLINE3_WEBSOCKET": true,
"DIRECTLINE3_POLLINGINTERVAL": 1000
},
"Sources": {},
"Envs": {}
}
}

This issue got resolved after I ran npm install -g botium-core

Related

The webdriver module is not found when run a custom sample with botium-cli?

I'm working on Windows 10, and I trying to run the custom sample that was cloned from https://github.com/codeforequity-at/botium-connector-webdriverio.git
I've already installed this components, following the steps into the links:
*Automation Tests: https://ichi.pro/es/botium-en-pocas-palabras-parte-3-automatizacion-de-pruebas-de-chatbot-119084922769950
*Install Webdriverio and selenium: https://github.com/codeforequity-at/botium-connector-webdriverio
Basically, I have executed the following commands from my project path:
*npm install -g botium-cli npm install -g botium-connector-webdriverio
*botium-cli init
*botium-cli run
Note: To run the tests I'm using the following command, after start selenium:
botium-cli run --config C:\Botiumsample\samples\custom\botium.json --convos C:\Botiumsample\samples\custom\spec\convo
This is the output that I'm getting:
Error: Loading Botium Plugin failed.
Loading Botium plugin from webdriverio failed - Cannot find module 'webdriverio'
Require stack:
- C:\Users\myuser\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-
core\src\containers\plugins\index.js
- C:\Users\myuser\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-
core\index.js
- C:\Users\myuser\AppData\Roaming\npm\node_modules\botium-cli\src\run\index.js
- C:\Users\myuser\AppData\Roaming\npm\node_modules\botium-cli\bin\botium-cli.js
Loading Botium plugin botium-connector-webdriverio failed, try "npm install botium-
connector-webdriverio" - Cannot find module 'botium-core'
Require stack:
- C:\Users\myuser\AppData\Roaming\npm\node_modules\botium-connector-
webdriverio\dist\botium-connector-webdriverio-cjs.js
- C:\Users\myuser\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-
core\src\containers\plugins\index.js
- C:\Users\myuser\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-
core\index.js
- C:\Users\myuser\AppData\Roaming\npm\node_modules\botium-cli\src\run\index.js
- C:\Users\myuser\AppData\Roaming\npm\node_modules\botium-cli\bin\botium-cli.js
at tryLoadPlugin (C:\Users\myuser\AppData\Roaming\npm\node_modules\botium-
cli\node_modules\botium-core\src\containers\plugins\index.js:133:9)
at PluginConnectorContainer.Validate
(C:\Users\myuser\AppData\Roaming\npm\node_modules\botium-cli\node_modules\botium-
core\src\containers\PluginConnectorContainer.js:14:27)
Despite the response, I can see the webdriverio module in this path:
C:\Users\myuser\AppData\Roaming\npm\node_modules\botium-connector-webdriverio\node_modules\webdriverio
Please any idea about this error?. Thanks
This has to do with how Node.js is resolving modules. You can read about this topic in lots of places over the internet, for example here. But in short:
Botium Core is installed as nested package of Botium CLI
Botium WebdriverIO Connector is installed outside
Botium Core is not visible to the Botium WebdriverIO Connector module
Several options available:
Install Botium Core as global module on the top level as well:
npm install -g botium-cli botium-core botium-connector-webdriverio
Install everything in a local project directory (recommended - project directory can be put under git control with all dependencies):
npm init --yes && npm install botium-cli botium-connector-webdriverio
npx botium-cli init
npx botium-cli run

Webpack failed to compile npm start

I got a project that I need to work on. I forked the project from gitlab, unzipped it into my workspace folder, ran terminal and the following commands
node --version
npm --version
npm install
npm init
npm start
This should have installed all devDependencies (I turned production to false) and the server should be up and running. However, I'm getting the following error
`ERROR in .//src/client/index.js
Module build failed: Error: No ESLint configuration found.
at getLocalConfig ((dir)\node_modules\eslint\lib\config.js:162:35)
at Config.getConfig ((dir)\node_modules\eslint\lib\config.js:259:26)
at processText ((dir)\node_modules\eslint\lib\cli-engine.js:224:33)
at CLIEngine.executeOnText ((dir)\node_modules\eslint\lib\cli-engine.js:754:26)
at lint ((dir)\node_modules\eslint-loader\index.js:44:31)
at Object.module.exports ((dir)\node_modules\eslint-loader\index.js:181:3)
webpack: Failed to compile.`
I do have a eslintrc both on root dir and /src/client. What am I missing here ?

How to install through npm globally?

I am on OS X(El Capitan). I install node using following command.
brew install node
Then I installed webpack using following command:
npm install -g webpack
And I also followed this url : Github Url
To install globally but when I am running
webpack on my terminal I am getting
zsh: command not found: webpack
~/projects/personal/React  npm install -g webpack
/Users/rahul/.npm-packages/bin/webpack -> /Users/rahul/.npm-packages/lib/node_modules/webpack/bin/webpack.js
> fsevents#1.0.14 install /Users/rahul/.npm-packages/lib/node_modules/webpack/node_modules/fsevents
> node-pre-gyp install --fallback-to-build
[fsevents] Success: "/Users/rahul/.npm-packages/lib/node_modules/webpack/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node" is installed via remote
/Users/rahul/.npm-packages/lib
export
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.Tp9FugZTE3/Render
DISPLAY=/private/tmp/com.apple.launchd.ZgQngbBnwx/org.macosforge.xquartz:0
EDITOR='subl -w'
HOME=/Users/rahul
ITERM_PROFILE=Custom
ITERM_SESSION_ID=w0t4p1:4DEA1B55-94CE-48E7-85A6-347D29A53122
ITERM_SHELL_INTEGRATION_INSTALLED=Yes
LC_CTYPE=UTF-8
LESS=-R
LOGNAME=rahul
LSCOLORS=Gxfxcxdxbxegedabagacad
PAGER=less
PATH=/usr/local/share/python:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
PROJECT_HOME=/Users/rahul/Projects
PWD=/Users/rahul/projects/personal/React
SHELL=/bin/zsh
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.Ixik08zS9V/Listeners
TERM=xterm-256color
TERM_PROGRAM=iTerm.app
TERM_PROGRAM_VERSION=3.0.7
TERM_SESSION_ID=w0t4p1:4DEA1B55-94CE-48E7-85A6-347D29A53122
TMPDIR=/var/folders/kk/9jwxx0r532s_cff8m4rx080w0000gn/T/
USER=rahul
USER_NAME=Rahul
VIRTUALENVWRAPPER_HOOK_DIR=/Users/rahul/.virtualenvs
VIRTUALENVWRAPPER_PROJECT_FILENAME=.project
VIRTUALENVWRAPPER_SCRIPT=/usr/local/bin/virtualenvwrapper.sh
VIRTUALENVWRAPPER_WORKON_CD=1
WORKON_HOME=/Users/rahul/.virtualenvs
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
ZSH=/Users/rahul/.oh-my-zsh
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
you need to install webpack locally into your project as well.
npm install webpack --save-dev

Unable to install bower on Openshift

I am unable to install bower on Openshift. I keep on getting errors like
remote: npm ERR! Error: ENOENT, lstat '/var/lib/openshift/537xxxxcd/app-root/runtime/repo/node_modules/bower/node_modules/mout/array/intersection.js'[K
remote: npm ERR! If you need help, you may report this log at:[K
remote: npm ERR! <http://github.com/isaacs/npm/issues>[K
remote: npm ERR! or email it to:[K
remote: npm ERR! <npm-#googlegroups.com>[K
You can see full deployment logs https://s3.amazonaws.com/archive.travis-ci.org/jobs/26291843/log.txt [From travis here].
I tried several approaches:
1) with and without .bowerrc file
case:1
{
"directory": "~/app-root/runtime/repo/public/libs"
"storage": {
"cache": "~/app-root/runtime/repo/node_modules/bower/cache",
"completion": "~/app-root/runtime/repo/node_modules/bower/completion",
"git": "~/app-root/runtime/repo/node_modules/bower/git_template"
},
"interactive": "false",
"tmp":"~/app-root/runtime/repo/node_modules/bower/tmp",
"cwd":"~/app-root/runtime/repo"
}
case:2
{
"directory": "public libs"
}
Also, tried running following commands [In $HOME/app-root/runtime/repo] and tried npm install bower by SSH shell
npm cache clear
npm cache clean
Any help to resolve this would be great.
In case you want to look at my repo you can find it here: https://github.com/prasunsultania/demoblog
Here is how I made use of bower on OpenShift using the node.js cartridge:
Prerequisites:
Usually you have installed Bower globally.
The git repo which you push to OpenShift must be readily configured for using Bower so that bower install from the root of the repo will do the job.
Necessary steps:
Create the file .openshift/action_hooks/deploy
Do chmod +x .openshift/action_hooks/deploy to make it executable BEFORE you add and commit it to your repo
Add the following lines to the file:
#!/usr/bin/env bash
HOME=$HOME/app-root/runtime
cd ~/repo
npm install bower
./node_modules/.bin/bower install
Add and commit the file to your git repo
Push your git repo to OpenShift
This suggests the following approach:
Add dependency "bower": "latest" to package.json
Add script for postinstall:
"scripts": {
...
"postinstall": "HOME=$OPENSHIFT_REPO_DIR bower install || bower install"
},
well, for each time you need to use bower install, you can use export HOME=$HOME/app-root/runtime/repo in the RHC tool, and then into the folder './app-root/repo' you can use the bower install, if bower command is not available, go to folder './nodejs' and do npm install bower.
Then, in order with RHC tool (this worked perfect to me):
1 - rhc ssh proyect-name
2 - cd nodejs
3 - npm install bower
4 - cd ..
5 - export HOME=$HOME/app-root/runtime/repo
6 - cd app-root/repo
7 - bower install
done! good luck with your projects

package.json for global module installation

I have a package.json in which some modules have to be installed globally,below is the part that i added below dependencies
"scripts": {
"preinstall": "npm i -g supervisor",
"preinstall": "npm i -g forever"
}
But when i ran npm install i got the error as below
npm WARN package.json aaa#0.0.0 No README.md file found!
npm WARN cannot run in wd aaa#0.0.0 npm i -g forever (wd=/home/administrator/AAA)
All the modules to be installed locally are getting installed,but only gloal installation is throwing an error.I am stuck here any help will be much appreciated.
Put this in your package.json :
"config":{
"unsafe-perm":true
}
And install your module as root.
Also I think that the switch preferGlobal : Documentation, is created for modules that prefer to be installed globally. You might want to change your program logic to use programatically forever module.
Install your modules locally and then execute them via the bin folder in the local node_modules directory
npm install -S forever
ls node_modules/.bin/
To start your app execute
node_modules/.bin/forever start app.js

Resources