Reputation: 593
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
Upvotes: 1
Views: 1133
Reputation: 35194
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
Upvotes: 1