# Help With "Deploying our app" tests

**URL:** <https://discourse.mozilla.org/t/help-with-deploying-our-app-tests/96395>\
**Category:** Learn\
**Tags:** issue\
**Created:** [April 24, 2022, 11:31pm UTC](https://discourse.mozilla.org/t/help-with-deploying-our-app-tests/96395 "2022-04-24T23:31:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![gbruch](https://avatars.discourse-cdn.com/v4/letter/g/e95f7d/32.png) [@gbruch](https://discourse.mozilla.org/u/gbruch)\
**Post date:** [April 24, 2022, 11:31pm UTC](https://discourse.mozilla.org/t/help-with-deploying-our-app-tests/96395/1 "2022-04-24T23:31:36Z")

</div>

Greetings, I’m getting an error code on attempts to use the command “npm run test”

Error: Cannot find module ‘C:\Users\UserName\Git Tests\will-it-miss\tests\*.js’  
at Function.Module.\_resolveFilename (node:internal/modules/cjs/loader:933:15)  
at Function.Module.\_load (node:internal/modules/cjs/loader:778:27)  
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run\_main:77:12)  
at node:internal/main/run\_main\_module:17:47 {  
code: ‘MODULE\_NOT\_FOUND’,  
requireStack: []  
}

I assumed, from reading this error, that this means the file for the nasa test in the learning section is unable to be found at the specified location. I have checked the file path to ensure it is in the path in the same location as Cannot find module ‘C:…’. I additionally ensured that the code was done correctly, for the nasa-feed.test.js and the package.json files. If anyone else has had this issue, or has found a workaround please let me know at the earliest convenience, as everything appears to be correct.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![mikoMK](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/mikomk/32/50456_2.png) [@mikoMK](https://discourse.mozilla.org/u/mikoMK)\
**Post date:** [May 1, 2022, 12:05am UTC](https://discourse.mozilla.org/t/help-with-deploying-our-app-tests/96395/2 "2022-05-01T00:05:23Z")

</div>

Hi @gbruch and welcome to the community 👋

I haven’t done this exercise myself, but what looks suspicious is the path:  
`C:\Users\UserName\Git Tests\will-it-miss\tests*.js`  
Normally, test files would go into their own directory. Looking at your path above it seems like the test files are directly in the project directory and start with “tests” and end with “.js”. Is it possible that the path should be:  
`C:\Users\UserName\Git Tests\will-it-miss\tests\*.js`  
It would then refer to all JS files inside the “tests” directory. Maybe “scripts” -\> “test” in package.json is missing the backslash.

Have a nice day,  
Michael

---

<div class="post-metadata">

**Author:** ![schalkneethling](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/schalkneethling/32/22691_2.png) [@schalkneethling](https://discourse.mozilla.org/u/schalkneethling)\
**Post date:** [May 7, 2022, 12:45pm UTC](https://discourse.mozilla.org/t/help-with-deploying-our-app-tests/96395/3 "2022-05-07T12:45:16Z")

</div>

Hey @gbruch! Welcome to the MDN Web Docs learning community.  
Can you provide a link to the code exercise you are following?

–  
Schalk  
Staff Community Manager - MDN Web Docs

---

<div class="post-metadata">

**Author:** ![mikoMK](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/mikomk/32/50456_2.png) [@mikoMK](https://discourse.mozilla.org/u/mikoMK)\
**Post date:** [May 7, 2022, 4:33pm UTC](https://discourse.mozilla.org/t/help-with-deploying-our-app-tests/96395/4 "2022-05-07T16:33:22Z")

</div>

Hi @schalkneethling

It’s from “Tools and testing - Client-side web development tools”:

> **[Deploying our app - Learn web development | MDN](https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Client-side_tools/Deployment)**
>
> In the final article in our series, we take the example toolchain we built up in the previous article and add to it so that we can deploy our sample app. We push the code to GitHub, deploy it using GitHub Pages, and even show you how to add a simple...

---

<div class="post-metadata">

**Author:** ![schalkneethling](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/schalkneethling/32/22691_2.png) [@schalkneethling](https://discourse.mozilla.org/u/schalkneethling)\
**Post date:** [June 8, 2022, 5:29pm UTC](https://discourse.mozilla.org/t/help-with-deploying-our-app-tests/96395/5 "2022-06-08T17:29:14Z")

</div>

> [@gbruch](#):
>
> C:\Users\UserName\Git Tests\will-it-miss\tests\*.js

Hey @gbruch,

Looking at this line:

```auto
C:\Users\UserName\Git Tests\will-it-miss\tests*.js

```

Can you please double check that the following line in your package .json:

```auto
"test": "node tests/*.js",

```

Is typed as `"test": "node tests/*.js",` and not “test”: “node tests\*.js”,`. Notice the missing forward slash(/). Let me know if this helps solve your problem.

–  
Schalk  
Staff Community Manager - MDN Web Docs

---

<div class="post-metadata">

**Author:** ![IT-Ethno](https://avatars.discourse-cdn.com/v4/letter/i/d26b3c/32.png) [@IT-Ethno](https://discourse.mozilla.org/u/IT-Ethno)\
**Post date:** [July 4, 2022, 7:05pm UTC](https://discourse.mozilla.org/t/help-with-deploying-our-app-tests/96395/6 "2022-07-04T19:05:35Z")

</div>

Hello.

I am having exactly the same problem, except that I have no typo in the definition of the test command like gbruch had in his initial question. In the scripts section of package.json I have

“test”: “node tests/\*.js”,  
“build”: “npm run test && parcel build src/index.html”

The complete error node throws:

```
node:internal/modules/cjs/loader:949
  throw err;
  ^

Error: Cannot find module 'C:\Users\thors\Desktop\will-it-miss\tests\*.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:946:15)
    at Module._load (node:internal/modules/cjs/loader:787:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

```

Any further ideas?

Thank you in advance,  
Thorsten

---

<div class="post-metadata">

**Author:** ![Lonely\_Almond\_972](https://avatars.discourse-cdn.com/v4/letter/l/cab0a1/32.png) [@Lonely\_Almond\_972](https://discourse.mozilla.org/u/Lonely_Almond_972)\
**Post date:** [June 28, 2023, 2:08am UTC](https://discourse.mozilla.org/t/help-with-deploying-our-app-tests/96395/7 "2023-06-28T02:08:29Z")

</div>

> [@IT-Ethno](#):
>
> Hello.

Hi，have you solved your problem？ Now I have the same problem， I tried to replace “ \*.js ” with “ nasa-feed.test.js ”，it worked. But I still want to know what the problem is.

---

<div class="post-metadata">

**Author:** ![Junaid\_Ali](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@Junaid\_Ali](https://discourse.mozilla.org/u/Junaid_Ali)\
**Post date:** [August 5, 2023, 3:13pm UTC](https://discourse.mozilla.org/t/help-with-deploying-our-app-tests/96395/8 "2023-08-05T15:13:16Z")

</div>

Hi,

I am going through this article and I also have this problem can anyone tell me how to solve this?

It is saying:  
`Error: Cannot find module will-it-miss\tests\*.js'`
