1

I have been studying azure devops in the past weeek and i have been trying to deoploy my first node app on azure but i keep running on an error of build failed. and the error is Error Cannot find module './routes/hostelRoutes' so i have checked and confirmed that the module is available because everything runs on my local machine. Below is a pic where i get the error

enter image description here enter image description here

1 Answer 1

1

According to the error message:

Error Cannot find module './routes/hostelRoutes'

The ‘node_modules’ folder could have some issues.

You could try to remove the directory ‘/node_modules/’ and re-install the folder.

Please refer to the following command line script about removing and re-installing.

cd  Project_folder
rm -rf node_modules
npm install

You could check this ticket How do I resolve “Cannot find module” error using Node.js? for some information

Sign up to request clarification or add additional context in comments.

1 Comment

Tahnks soo mucn. Acutally i realized there was a problem with my git history . the file had a conflitct before so it was not being tracked

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.