3

Hi developers and contributors,

I am struggling to find out what is the issue with the following error:

./src/app/models/type/ModelType.ts:2:0-44 - Error: Module not found: Error: Resolving to directories is not possible with the exports field (request was ./)

This error came when I upgraded my angular version from v12 to v13 (also upgraded some older packages with the latest ones). I am trying to solve this for a couple of days and it would be nice if someone faced the same issue, or have any ideas where it may come from.

5
  • Have you seen this question? Could it be that you have a similar error in your file? If not, please post more details (e.g. your ModelType.ts) because it's hard to help you otherwise. Commented Dec 5, 2021 at 18:15
  • Great, this was the problem in my case, too. Not exactly with the rxjs, but all the imports that have been ending with '/', e.g., >import { Injectable } from '@angular/core/'; In addition, I pasted the exact error and I could not find the question that you suggested. Since, your answer is just a comment, I cannot mark it as accepted in order to thank you. Do you have any clue why and how I can mark it? Commented Dec 6, 2021 at 8:40
  • In addition, now I have the following error: > Uncaught TypeError: (0 , tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate) is not a function at Module.2200 (app.service.ts:14) at webpack_require (bootstrap:19) at Module.5921 (material.module.ts:62) ... I found this question - es.stackoverflow.com/questions/499455/… , but there is no answer yet. Commented Dec 6, 2021 at 8:53
  • I suggest you raise a new question for this ohne. And in this question, please provice a bit more detail (e.g. the content of app.service.ts) Commented Dec 6, 2021 at 9:35
  • @AljoshaKoecher, thanks for the suggestions! It was a good idea to post the content of the package.json file (I suppose you meant this). Whatever, everything works fine now when I updated the typescript version. Commented Jan 28, 2022 at 14:13

1 Answer 1

1

Upgrading to "typescript": "4.5.4" resolved this issue.

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

Comments

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.