MicrosoftDocs / mslearn-build-api-azure-functions

MSLearn exercise code
MIT License
24 stars 59 forks source link

'Cannot find module '@azure/identity' Require stack: #16

Closed Baso1st closed 1 year ago

Baso1st commented 2 years ago

Worker was unable to load function CreateProduct: 'Cannot find module '@azure/identity' Require stack:

\mslearn-build-api-azure-functions\api\node_modules\@azure\cosmos\dist\index.js........ A **workaround** to it according to https://github.com/Azure/azure-sdk-for-js/issues/22968#issue-1345800240 is to **downgrade the @azure/cosmos version.** ![image](https://user-images.githubusercontent.com/29257536/189360592-d00973a2-324f-4867-90b2-e9d0068541fd.png) Now it should work just fine for you. If it didn't try deleting the **package-lock.json** file and also delete the **node_modules** folder then run it again.
ggailey777 commented 1 year ago

Thanks @Baso1st we are keeping the Cosmos DB at 3.9.3 for this project