# 2.2.3 Error returned from npm run wdio

**URL:** <https://club.ministryoftesting.com/t/2-2-3-error-returned-from-npm-run-wdio/86872>\
**Category:** Courses\
**Tags:** automation, mot-fcta\
**Created:** [7 November 2025 16:40 UTC](https://club.ministryoftesting.com/t/2-2-3-error-returned-from-npm-run-wdio/86872 "2025-11-07T16:40:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![joanne.macfarlane](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/joanne.macfarlane/32/15317_2.png) [@joanne.macfarlane](https://club.ministryoftesting.com/u/joanne.macfarlane)\
**Post date:** [7 November 2025 16:40 UTC](https://club.ministryoftesting.com/t/2-2-3-error-returned-from-npm-run-wdio/86872/1 "2025-11-07T16:40:07Z")

</div>

Hiya,

I’m looking for some help with an error I’m receiving when running this command: npm run wdio  
The first part of the response is shown below. It seems the browser is not fully initialised and it can’t find the module ‘@wdio/globals’

 ![image](https://us1.discourse-cdn.com/flex020/uploads/ministryoftesting/original/2X/8/8318725f1ff0b88f2ae34499c9bd94181158a7c0.png)

Any ideas as to how I can resolve this?  
Thanks in advance! 😀

---

<div class="post-metadata">

**Author:** ![flynnbops](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/flynnbops/32/7757_2.png) [@flynnbops](https://club.ministryoftesting.com/u/flynnbops)\
**Post date:** [8 November 2025 14:38 UTC](https://club.ministryoftesting.com/t/2-2-3-error-returned-from-npm-run-wdio/86872/2 "2025-11-08T14:38:49Z")

</div>

This issue jumped out to me. There’s a previous thread which may help

> [@How can I fix this "Cannot find module '@widio/globals'"?](https://club.ministryoftesting.com/t/how-can-i-fix-this-cannot-find-module-widio-globals/74213/15):
>
> to anyone else having this issue: the issue in mine was caused by having an …e2e.js file in the src/tests/ folder rather than in the ./test/specs/ folder the instructions on 2.3.3 are correct and present, but it’s easy to miss this small instruction! [link here](https://www.ministryoftesting.com/certification-paths/mot-foundation-certificate-in-test-automation-javascript/modules/2/lessons/2-3-3#:~:text=To%20begin%2C%20we%20start%20by%20creating%20a%20new%20file%20entitled%C2%A0Login.e2e.js%20in%20the%C2%A0test%20folder)@mwinteringham might be worth updating that line in the course to be in red text similar to the Unit test section above?

---

<div class="post-metadata">

**Author:** ![joanne.macfarlane](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/joanne.macfarlane/32/15317_2.png) [@joanne.macfarlane](https://club.ministryoftesting.com/u/joanne.macfarlane)\
**Post date:** [14 November 2025 14:18 UTC](https://club.ministryoftesting.com/t/2-2-3-error-returned-from-npm-run-wdio/86872/3 "2025-11-14T14:18:06Z")

</div>

Thanks for responding… I had seen that thread too, but my e2e.js file already seems to be in the correct place, within the ./test/specs/ folder:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/ministryoftesting/original/2X/c/c1f9be61b2237f6e2e5d9ddb9d6872584ec8da06.png)

---

<div class="post-metadata">

**Author:** ![joanne.macfarlane](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/joanne.macfarlane/32/15317_2.png) [@joanne.macfarlane](https://club.ministryoftesting.com/u/joanne.macfarlane)\
**Post date:** [14 November 2025 14:34 UTC](https://club.ministryoftesting.com/t/2-2-3-error-returned-from-npm-run-wdio/86872/4 "2025-11-14T14:34:40Z")

</div>

Actually - I’ve not looked at this for a week, and have now tried again and its working 🙈 Thanks anyway for your help/good thoughts! Perhaps you fixed it with the powers of your mind 😆

---

<div class="post-metadata">

**Author:** ![flynnbops](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/flynnbops/32/7757_2.png) [@flynnbops](https://club.ministryoftesting.com/u/flynnbops)\
**Post date:** [19 November 2025 13:22 UTC](https://club.ministryoftesting.com/t/2-2-3-error-returned-from-npm-run-wdio/86872/5 "2025-11-19T13:22:44Z")

</div>

The power of friendship strikes again!
