udevbe / greenfield

HTML5 Wayland compositor :seedling:
GNU Affero General Public License v3.0
901 stars 27 forks source link

Can't resolve './api' #103

Closed TheAwesome98-Real closed 2 years ago

TheAwesome98-Real commented 2 years ago

When I yarn build:

Compiled with problems:

ERROR in ./src/WebFS.ts 17:0-48

Module not found: Error: Can't resolve './api' in '/path/to/greenfield/compositor-module/src'

ERROR in ./src/RemoteSocket.ts (/path/to/greenfield/compositor-module/src/RemoteSocket.ts) 21:40-47

[tsl] ERROR in /path/to/greenfield/compositor-module/src/RemoteSocket.ts(21,41)
      TS2307: Cannot find module './api' or its corresponding type declarations.

ERROR in ./src/WebFS.ts (/path/to/greenfield/compositor-module/src/WebFS.ts) 18:40-47

[tsl] ERROR in /path/to/greenfield/compositor-module/src/WebFS.ts(18,41)
      TS2307: Cannot find module './api' or its corresponding type declarations.
Zubnix commented 2 years ago

I can't currently test this but that should be generated automatically. You do need to have java available at build time for this to work, as it uses an open-api code generation tool. You can try generating it explicitly with yarn generate.

TheAwesome98-Real commented 2 years ago

I’ll try that

stellarpower commented 2 years ago

Thanks, that fixed it. I have Java available at build, but presumably the generate step did not get called before yarn demo. Perhaps needs to be added to the docs here (?)

Zubnix commented 2 years ago

Thanks for the info! I've updated the readme.