Could not load helper Nightmare from module './helper/Nightmare'
See original GitHub issueWhat are you trying to achieve?
Hi @DavertMik , I’m trying to run tests with Nightmare (both nightmare and nightmare-upload have been installed globally):
codeceptjs run . --steps
What do you get instead?
Got following:
Could not load helper Nightmare from module './helper/Nightmare':
Required modules are not installed.
RUN: [sudo] npm install -g nightmare nightmare-upload
{}
Error:
at createHelpers (/usr/lib/node_modules/codeceptjs/lib/container.js:29:13)
at Object.create (/usr/lib/node_modules/codeceptjs/lib/container.js:102:15)
at Codecept.init (/usr/lib/node_modules/codeceptjs/lib/codecept.js:43:15)
at Command.module.exports (/usr/lib/node_modules/codeceptjs/lib/command/run.js:23:14)
at Command.listener (/usr/lib/node_modules/codeceptjs/node_modules/commander/index.js:301:8)
at emitTwo (events.js:106:13)
at Command.emit (events.js:191:7)
at Command.parseArgs (/usr/lib/node_modules/codeceptjs/node_modules/commander/index.js:615:12)
at Command.parse (/usr/lib/node_modules/codeceptjs/node_modules/commander/index.js:458:21)
at Object.<anonymous> (/usr/lib/node_modules/codeceptjs/bin/codecept.js:90:9)
My test code is:
Feature('Hellooworld');
Scenario('Login page loaded', (I) => {
I.amOnPage('/');
I.seeElement({name: 'password'});
});
Details
- CodeceptJS version:
- NodeJS Version:
- Operating System:
- Protractor || WebDriverIO || Nightmare version (if related)
- Configuration file:
{
"tests": "./tests/e2e/*_test.js",
"timeout": 20000,
"output": "./tests/e2e/output",
"helpers": {
"Nightmare": {
"url": "http://localhost:3000",
"show": false
}
},
"include": {},
"bootstrap": false,
"mocha": {},
"name": "ui"
}
Any thoughts about it? Thanks
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Issues - GitHub
Could not load helper Nightmare from module './helper/Nightmare': Required modules are not installed. RUN: [sudo] npm install -g nightmare ...
Read more >Docker Could not load helper ResembleHelper - CodeceptJS
I have codeceptjs-resemblehelper module added. Tried to give the absolute path. REquired module manually. Nothing helped. SImple docker command
Read more >Codeception/CodeceptJS - Gitter
Could not load helper DbHelper from module 'node_modules/codeceptjs-dbhelper': Cannot find module 'node_modules/codeceptjs-dbhelper'.
Read more >Nightmare JS not working - Stack Overflow
I'm on Windows, so can't help you much. You can browse through their GitHub issues for any information. – hassansin. Apr 19, 2016...
Read more >Nightmare | CodeceptJS
This helper should be configured in codecept.conf.ts or codecept.conf.js. url - base url of website to be tested.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Now as I expand my sample test to:
It errors with:
I met the same question after global installation. I solved the problem by changing to local installation and edited the
codecept.json
as followed :It works for me.