AppService and ReactJS: 'import Realm ...' not working

Hello,

I currently explore the MongoDB-React setup for a new project.

I created a fresh and innocent and working React project.

I installed realm by “npm install realm” → worked fine

file “package.json” says:

“dependencies”: {
@testing-library/jest-dom”: “^5.17.0”,
@testing-library/react”: “^13.4.0”,
@testing-library/user-event”: “^13.5.0”,
“react”: “^18.2.0”,
“react-dom”: “^18.2.0”,
“react-scripts”: “5.0.1”,
“realm”: “^12.6.0”,
“web-vitals”: “^2.1.4”

Now, when I put: import Realm from “realm”;
in one of the js-files I get the following error message:

“Module not found: Error: Package path . is not exported from package C:\temp\Tuts\mongotest1hh\node_modules\realm (see exports field in C:\temp\Tuts\mongotest1hh\node_modules\realm\package.json)”

I don´t see any “export fields” (as referred to in the error message") in my package.json file. Not sure if that´s a way to fix this problem.

Thank you!
Hans