Serenity-js: Cannot find module '@serenity-js/core/lib/config'

Created on 4 Feb 2020  路  7Comments  路  Source: serenity-js/serenity-js

Unexpected error while executing the tests inside the docker container. The same setup was working for me sometime back and suddenly started throwing this error. I normally run the command npm install-test. However, after this error, I tried the below commands.

SerenityJs version - 1.x

         - npm install
         - npm run pretest
         - npm run pree2e
         - npm test
[e2e] [chrome #11] [11:37:39] I/hosted - Using the selenium server at http://myserver:4444/wd/hub
[e2e] [chrome #11] [11:37:42] I/runnerCli - Cannot find module '@serenity-js/core/lib/config'
[e2e] 
[e2e] [11:37:42] I/testLogger - 
[e2e] 
[e2e] [11:37:42] E/launcher - Runner process exited unexpectedly with error code: 1
[e2e] [11:37:42] I/launcher - 1 instance(s) of WebDriver still running

Folder structure before the npm commands looks like:

drwxrwxrwx 6 root root   72 Feb  4 11:53 src
-rw-rw-rw- 1 root root 1398 Feb  4 11:53 protractor.conf.js
-rw-rw-rw- 1 root root 1366 Feb  4 11:53 package.json
-rw-rw-rw- 1 root root  466 Feb  4 11:53 README.md

All 7 comments

Hi @rakeshnambiar could you please post the contents of your package.json and protractor.conf.js files, please?

@jan-molak I have attached the files here. But I doubt this is something related to the docker image or the GitLab runner because the tests are PASS when I run directly from my IDE [on the Selenium grid]. In fact, it's worked with the same docker - GitLab pipeline settings sometime last week.

protractor.config.txt

package.txt

was there any new release recently? Sorry, I didn't get a chance to check.

this problem happened also with me, not in docker container
I use "serenity-js": "^1.10.13"

@rakeshnambiar, @DanteWitcher - Serenity/JS 2.0 was released yesterday, so your build might be pulling in @serenity-js/core that's no longer compatible.

I'd suggest adding an explicit dependency on @serenity-js/core v 1.6.0 to package.json for now and considering to migrate to 2.0 when you're ready.

npm install --save-dev --save-exact @serenity-js/[email protected]

Does this help?

yes, thanks, it helps) by the way, congratulations on the release

@jan-molak perfect !! It's worked now and closing the ticket.

Thanks; I've published an update to serenity-js 1.10.14 that prevents it from trying to pull in the 2.0 @serenity-js/core. Hopefully, this will help other engineers avoid the issues you guys have encountered.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GeeChao picture GeeChao  路  6Comments

san-ouadghiri picture san-ouadghiri  路  6Comments

akshayadesh picture akshayadesh  路  7Comments

tremkonzah picture tremkonzah  路  3Comments

jan-molak picture jan-molak  路  4Comments