We have now published a working build of our common module so we're now going to go back over to our
auth service inside of our art service.
If we open up that s our C directory open up routes and an open up say the current user file we've got
a ton of broken import statements inside of here.
So to fix all these up we're going to install our common module into the project after we install that
will then go through all the different files and cyber auth project.
We will find any broken import statements like the one we have right here and fix those all up.
So let's get to it.
Back at my terminal I'm going to change over to my off project directory and then I will install my
common module so I'll do an npm install.
Then my organization name which is SGI tickets last comment remember you definitely have a different
organization name to remember what yours is.
You can always go back over to your common directory find the package dot Jason File inside there and
then look up the name fields right there
all right.
So I'm going to install common should be pretty quick and there we go.
So now that we have all that code inside of our off project let's start to update these import statements.
We're going to do this in a very methodical fashion where it's going to go into our SRT directory and
we're going to go through all the files inside of here from top to bottom one at a time and we're going
to make sure that we don't have any errors in any import statements anywhere across the board.
So we will first begin inside of user tests.
Well I don't see any errors with the import statements inside of here.
So let's close this let's go into the roots underscore underscore a test directory current user test
file.
No issues here sign and test file.
No issues here.
Sign out no problem and sign up.
No problem.
All right out of the test directory into current user and right away I see some air start to appear.
So our current user Middleware is no longer defined inside this middleware directory.
We don't even have a middle where's directory inside the module.
So we need to update this import statement to try to get the current user middleware out of our common
module instead.
So all we have to do is update that import statement so put inside of here.
The name of a module SGI tickets slash comment.
And again for you you will have a different organization name so soon as I add that in here goes away.
That's pretty much it we're gonna repeat that same process for all the remaining files.
Let's go over to sign in.
Looks like we've got two errors right here.
Now this is actually kind of nice.
We were importing a middleware an area in separate import statements validate requests and bad request
error.
Both these things are now being exported from the same location inside of our shared module.
So we can actually condense these two imports down to one.
Let me show you how up here I'll put in an import for validate requests and a bad request air from SGI
tickets flash common
all then delete the other two imports and we're good to go.
OK.
That's it for signing.
Let's move on to sign out.
Well no issue here about sign up.
We've got two more here.
So let's fix those up.
I'll do an import of validate re quest and bad.
Request air from area and then delete the old imports.
That looks good.
That's it for our roots directory.
I'll take a look at these services file so inside of services I got password T.S..
Well no issue here.
Inside of our test directory.
No no issue here but inside of app.
Yes inside of app.
Yes we've got that error handler and the not found error as well.
So let's make sure we get those out of our custom module up here.
I'll get air handler and not found air from SGA tickets common.
And then once again I'll delete the old ones
oh that looks good.
We'll do a quick check inside the file.
No other issues inside of here.
So we are now onto our very last file index dot to yes.
And inside of your note no issues either.
And that's pretty much it.
Now in theory our auto module or auth project should be working.
OK.
So now we should build to start scaffold backup and just make sure we can still access our project inside
the browser.
But let's get to it back inside my terminal.
I had previously closed down scaffold when we started moving all that code around.
So inside of my ticketing project directory I'll do another scaffold death now as we launch this.
We have made a change the package just on file of our off project.
So chances are we're going to have to rebuild that project and install all the dependencies for it.
Once again that might take a moment or two.
So I'm positive you're right here and we'll do a quick test of our project in the next video.