Errors: 'module not found' when running npm run serve

Hi All!

I’m running custom deployment using

npm run serve

and when I open localhost:9000/manager/ I see just errors:

Compiled with problems:

ERROR in ./src/headers.ts 1:0-43

Module not found: Error: Can't resolve '@openremote/core' in '/home/anna/IdeaProjects/OR_EMS/openremote/ui/app/manager/src'


ERROR in ./src/index.ts 13:0-28

Module not found: Error: Can't resolve '@openremote/or-app' in '/home/anna/IdeaProjects/OR_EMS/openremote/ui/app/manager/src'


ERROR in ./src/pages/page-account.ts 9:0-39

Module not found: Error: Can't resolve '@openremote/core' in '/home/anna/IdeaProjects/OR_EMS/openremote/ui/app/manager/src/pages'


ERROR in ./src/pages/page-account.ts 10:0-44

Module not found: Error: Can't resolve '@openremote/or-components/or-panel' in '/home/anna/IdeaProjects/OR_EMS/openremote/ui/app/manager/src/pages'


ERROR in ./src/pages/page-account.ts 12:0-42

Module not found: Error: Can't resolve '@openremote/or-app' in '/home/anna/IdeaProjects/OR_EMS/openremote/ui/app/manager/src/pages'


ERROR in ./src/pages/page-assets.ts 18:0-37

Module not found: Error: Can't resolve '@openremote/or-asset-viewer' in '/home/anna/IdeaProjects/OR_EMS/openremote/ui/app/manager/src/pages'


ERROR in ./src/pages/page-assets.ts 20:0-209

Module not found: Error: Can't resolve '@openremote/or-asset-tree' in '/home/anna/IdeaProjects/OR_EMS/openremote/ui/app/manager/src/pages'


I have no idea how to solve it, any tips?

Make sure you have first run yarn install from the repo root directory

I’ve run yarn install, and I can see that modules are in node_modules. But somehow they are not found.

Well, I removed everything and started once again and now it run without errors. I think I didn’t run ./gradlew clean installDist the last time and it seems to fix issue.

1 Like