# Authn mfe dependency issue (with tutor in development env)

**URL:** https://discuss.openedx.org/t/authn-mfe-dependency-issue-with-tutor-in-development-env/13192
**Category:** Design
**Tags:** how-to, tutor
**Created:** [June 11, 2024, 2:00pm UTC](https://discuss.openedx.org/t/authn-mfe-dependency-issue-with-tutor-in-development-env/13192 "2024-06-11T14:00:54Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Faizan\_Shaikh](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/faizan_shaikh/32/6365_2.png) [@Faizan\_Shaikh](https://discuss.openedx.org/u/Faizan_Shaikh)
#### Post date: [June 11, 2024, 2:00pm UTC](https://discuss.openedx.org/t/authn-mfe-dependency-issue-with-tutor-in-development-env/13192/1 "2024-06-11T14:00:54Z")

</div>

Hi, I want to override the @frontend-app-authn mfe and use the @edx/brand-edx package to customize the login page to remove the register button and page and make changes to the css of the page.

Tutor version: 17.0.5  
MFE version: 17.0.1

**Redirecting to login page:**  
I used the admin portal to redirect the lms user to login page.

**Removing public registration functionality:**  
I created a tutor plugin to do this and it work fine.

**Then, I did the following:**

1. Fork frontend-app-authn repo
2. Clone repo to local computer

> 1. cd dev-env
> 2. git clone [https://github.com/my-repo/frontend-app-authn.git](https://github.com/my-repo/frontend-app-authn.git)

1. Bind-mount folder

> 1. tutor mounts add dev-env/frontend-app-authn
> 2. tutor mounts list

1. Fork openedx/brand repo
2. Clone repo to local computer

> 1. cd .local/share/tutor/env/build/openedx/themes
> 2. git clone [https://github.com/my-repo/my-brand.git](https://github.com/my-repo/my-brand.git) # this is the edx/brand-edx repo

1. Start my environment

> tutor dev start authn

The cms is working but the lms site can’t be reached.  
 ![2024-06-11 09_24_45-20.56.28.185 - Remote Desktop Connection](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/6/6fc7882861b034957c4195acced761c2a4a6cf65.png)

When I see the authn logs using tutor dev log authn, I get this:  
 ![2024-06-11 10_15_06-20.56.28.185 - Remote Desktop Connection](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/2/2b2f55099405f3463018f56831b928a1c18a5ddd.png)

So, I thought that the dependencies are not installed. Therefore I installed npm in the frontend-app-authn directory that I had cloned.

> cd dev-env/frontend-app-authn  
> npm install  
> There were some warning of deprecation but no errors.
> 
> ![2024-06-11 10_31_35-20.56.28.185 - Remote Desktop Connection](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/6/694fa6cbd08a8463373cf1fddb9881bbfa6aceec.png)

Then I did

> tutor config save  
> tutor images build authn  
> tutor dev start  
> and got a new error:
> 
> ![2024-06-11 10_32_58-20.56.28.185 - Remote Desktop Connection](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/3/3c3434df3e48546519da5c91daf22bdb4193c72b.png)

This is what a complete section of the authn logs looks like:

> @edx/frontend-app-authn@0.1.0 start  
> authn-1 | \> fedx-scripts webpack-dev-server --progress --config ./webpack.dev-tutor.config.js  
> authn-1 |  
> authn-1 | [webpack-cli] Failed to load ‘/openedx/app/webpack.dev-tutor.config.js’ config  
> authn-1 | [webpack-cli] Error: Cannot find module ‘@edx/frontend-build/config/webpack.dev.config.js’  
> authn-1 | Require stack:  
> authn-1 | - /openedx/app/webpack.dev-tutor.config.js  
> authn-1 | - /openedx/app/node\_modules/webpack-cli/lib/webpack-cli.js  
> authn-1 | - /openedx/app/node\_modules/webpack-cli/lib/bootstrap.js  
> authn-1 | - /openedx/app/node\_modules/webpack-cli/bin/cli.js  
> authn-1 | - /openedx/app/node\_modules/webpack-dev-server/bin/webpack-dev-server.js  
> authn-1 | - /openedx/app/node\_modules/@openedx/frontend-build/bin/fedx-scripts.js  
> authn-1 | at Module.\_resolveFilename (node:internal/modules/cjs/loader:1134:15)  
> authn-1 | at Module.\_load (node:internal/modules/cjs/loader:975:27)  
> authn-1 | at Module.require (node:internal/modules/cjs/loader:1225:19)  
> authn-1 | at require (node:internal/modules/helpers:177:18)  
> authn-1 | at Object. (/openedx/app/webpack.dev-tutor.config.js:7:7)  
> authn-1 | at Module.\_compile (node:internal/modules/cjs/loader:1356:14)  
> authn-1 | at Module.\_extensions…js (node:internal/modules/cjs/loader:1414:10)  
> authn-1 | at Module.load (node:internal/modules/cjs/loader:1197:32)  
> authn-1 | at Module.\_load (node:internal/modules/cjs/loader:1013:12)  
> authn-1 | at Module.require (node:internal/modules/cjs/loader:1225:19) {  
> authn-1 | code: ‘MODULE\_NOT\_FOUND’,  
> authn-1 | requireStack: [  
> authn-1 | ‘/openedx/app/webpack.dev-tutor.config.js’,  
> authn-1 | ‘/openedx/app/node\_modules/webpack-cli/lib/webpack-cli.js’,  
> authn-1 | ‘/openedx/app/node\_modules/webpack-cli/lib/bootstrap.js’,  
> authn-1 | ‘/openedx/app/node\_modules/webpack-cli/bin/cli.js’,  
> authn-1 | ‘/openedx/app/node\_modules/webpack-dev-server/bin/webpack-dev-server.js’,  
> authn-1 | ‘/openedx/app/node\_modules/@openedx/frontend-build/bin/fedx-scripts.js’

I am not exactly sure but I think it cannot find the repo **@edx/frontend-build** because it has been moved to **@openedx/frontend-build**. To begin with, I do not understand why it is trying to find the **@edx/frontend-build** repo. I think it should try to find the **@openedx/frontend-build**. If this is how it should work, how can I fix this issue. I am new to openedx and tutor and I am not sure if I am missing something or doing something wrong. I need help fixing this issue.  
Thank you in advance.

---

<div class="post-metadata">

### Author: ![vivek](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/vivek/32/6825_2.png) [@vivek](https://discuss.openedx.org/u/vivek)
#### Post date: [June 12, 2024, 4:52am UTC](https://discuss.openedx.org/t/authn-mfe-dependency-issue-with-tutor-in-development-env/13192/3 "2024-06-12T04:52:13Z")

</div>

hi @Faizan_Shaikh ,  
Run this command  
`tutor dev run authn bash -c "npm install webpack-dev-server --save-dev"`  
i think it is because of webpack module

---

<div class="post-metadata">

### Author: ![Faizan\_Shaikh](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/faizan_shaikh/32/6365_2.png) [@Faizan\_Shaikh](https://discuss.openedx.org/u/Faizan_Shaikh)
#### Post date: [June 12, 2024, 8:00pm UTC](https://discuss.openedx.org/t/authn-mfe-dependency-issue-with-tutor-in-development-env/13192/4 "2024-06-12T20:00:39Z")

</div>

Thanks for the reply Vivek. I will try this and then let you know if this worked or not.

---

<div class="post-metadata">

### Author: ![Faizan\_Shaikh](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/faizan_shaikh/32/6365_2.png) [@Faizan\_Shaikh](https://discuss.openedx.org/u/Faizan_Shaikh)
#### Post date: [June 30, 2024, 10:01am UTC](https://discuss.openedx.org/t/authn-mfe-dependency-issue-with-tutor-in-development-env/13192/5 "2024-06-30T10:01:44Z")

</div>

Thank you for the answer. This actually worked. I wonder why this happened in the first place. @regis , am I doing something wrong or does this happen to everyone?

Update: I am using Redwood 1 instead of Quince as mentioned earlier.  
Just for context, this is what the logs look like after the applying the solution.

```auto
thisuser@thisDevice:~$ tutor dev logs authn
docker compose -f /home/thisuser/.local/share/tutor/env/local/docker-compose.yml -f /home/thisuser/.local/share/tutor/env/dev/docker-compose.yml --project-name tutor_dev logs authn
authn-1 |
authn-1 | > @edx/frontend-app-authn@0.1.0 start
authn-1 | > fedx-scripts webpack-dev-server --progress --config ./webpack.dev-tutor.config.js
authn-1 |
authn-1 | No local module configuration file found. This is fine.
authn-1 | <i> [webpack-dev-server] [HPM] Proxy created: /api/mfe_config/v1 -> http://local.edly.io:8000
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:2101/
<i> [webpack-dev-server] Content not from webpack is served from '/openedx/app/public' directory
<i> [webpack-dev-server] 404s will fallback to '/authn/index.html'
assets by info 955 bytes [immutable]
authn-1 | asset 24068215015af53c8a67fa1c36d8f0a9.png 613 bytes [emitted] [immutable] [from: node_modules/@openedx/paragon/dist/Card/fallback-default.png] (auxiliary name: app)
authn-1 | asset 95ec738c0b7faac5b5c9126794446bbd.svg 342 bytes [emitted] [immutable] [from: node_modules/@openedx/paragon/dist/Avatar/default-avatar.svg]
authn-1 | asset app.js 22 MiB [emitted] (name: app)
authn-1 | asset index.html 770 bytes [emitted]
authn-1 | orphan modules 4.6 MiB [orphan] 2703 modules
authn-1 | runtime modules 29.7 KiB 16 modules
authn-1 | cacheable modules 7.23 MiB
authn-1 | modules by path ./node_modules/ 4.97 MiB
authn-1 | javascript modules 4.9 MiB 1495 modules
authn-1 | json modules 63.9 KiB
authn-1 | ./node_modules/i18n-iso-countries/langs/ar.json 4.52 KiB [built] [code generated]
authn-1 | ./node_modules/i18n-iso-countries/langs/en.json 4.64 KiB [built] [code generated]
authn-1 | ./node_modules/i18n-iso-countries/langs/es.json 4.57 KiB [built] [code generated]
authn-1 | ./node_modules/i18n-iso-countries/langs/fr.json 4.54 KiB [built] [code generated]
authn-1 | ./node_modules/i18n-iso-countries/langs/zh.json 2.91 KiB [built] [code generated]
authn-1 | ./node_modules/i18n-iso-countries/langs/ca.json 4.46 KiB [built] [code generated]
authn-1 | + 8 modules
authn-1 | modules by path ./src/ 2.27 MiB 138 modules
authn-1 | env.config (ignored) 15 bytes [built] [code generated]
authn-1 | webpack 5.89.0 compiled successfully in 23564 ms

```

---

<div class="post-metadata">

### Author: ![Syed\_Muhammad\_Dawoud](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/syed_muhammad_dawoud/32/6313_2.png) [@Syed\_Muhammad\_Dawoud](https://discuss.openedx.org/u/Syed_Muhammad_Dawoud)
#### Post date: [July 1, 2024, 11:31am UTC](https://discuss.openedx.org/t/authn-mfe-dependency-issue-with-tutor-in-development-env/13192/6 "2024-07-01T11:31:35Z")

</div>

did you build authn-dev image? I see you used start instead of launch. start does not build the images, which could be reason for 2nd error. For fedx-scripts, yes, you need to run npm install in the cloned MFE directory.

---

<div class="post-metadata">

### Author: ![Faizan\_Shaikh](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/faizan_shaikh/32/6365_2.png) [@Faizan\_Shaikh](https://discuss.openedx.org/u/Faizan_Shaikh)
#### Post date: [July 3, 2024, 7:22pm UTC](https://discuss.openedx.org/t/authn-mfe-dependency-issue-with-tutor-in-development-env/13192/7 "2024-07-03T19:22:06Z")

</div>

Ah I see. I thought doing npm install wasn’t required when using tutor so I didn’t run `npm install` inside the mfe folder.  
I later also tried to setup the learner-dashboard mfe locally and had no issues after running the `npm install` command.

Thank you for the insight. Best  
Faizan
