Enonic version: 7.0.2
OS: Win10
I’m having some difficulties getting the https://github.com/enonic/lib-http-client to work with a project based on the webpack starter app.
I’ve added include "com.enonic.lib:lib-http-client:2.0.0"
to the dependiencies in build.gradle
When importing with const httpClient = require('/lib/http-client');
I get the build error:
ERROR in ./lib/observe/observe.es6
Module not found: Error: Can't resolve '/lib/http-client' in 'C:\Users\Martin\work\internal\enonic\client-test-project\src\main\resources\lib\observe'
@ ./lib/observe/observe.es6 3:17-44
@ ./main.es6
FAILURE: Build failed with an exception.
When importing with const httpClient = require('/lib/xp/http-client');
It will successfully build, but the project will crash on execution with the error
Caused by: com.enonic.xp.resource.ResourceNotFoundException: Resource [com.example.myproject:/lib/xp/http-client] was not found
It this an issue connected to either the starter or the library itself? I can’t find any direct way to attack this issue, any feedback is appreciated.