Hi,

I have resolved he issue by importing Widget directly through npm.

The Widget is already in npm registered repos and can be used by adding  "
import Widget from "@wso2-dashboards/widget";" instead of "import
ExtendedWidget
from './ExtendedWidget';"


On Tue, Jul 3, 2018 at 2:42 PM Niveathika Rajendran <[email protected]>
wrote:

> Hi Thisaru,
>
> From the logs, it seems you have updated HelloWorld.jsx file as in Step 4.
> Here, we are importing "ExtendedWiget.jsx" file created in Step 3, adding
> that to the src folder should resolve this issue.
>
> Best Regards,
> *Niveathika Rajendran,*
> *Software Engineer.*
> *Mobile : +94 077 903 7536*
>
>
>
>
>
> On Tue, Jul 3, 2018 at 2:30 PM Thisaru Guruge <[email protected]> wrote:
>
>> Hi,
>>
>> I am trying to create a custom widget in SP dashboard and I followed the
>> example shown in the documentation on creating custom widgets
>> <https://docs.wso2.com/display/SP410/Creating+Custom+Widgets>
>>
>> I followed exactly same and getting following error when tried to build
>> the widget:
>>
>> ERROR in ./HelloWorld.jsx
>>
>> Module not found: Error: Can't resolve './ExtendedWidget' in
>> '/Users/Thisaru/Projects/IS_Analytics_Migation/carbon-dashboards/samples/widgets/HelloWorld/src'
>>
>>  @ ./HelloWorld.jsx 9:23-50
>>
>> npm ERR! code ELIFECYCLE
>>
>> npm ERR! errno 2
>>
>> npm ERR! [email protected] build: `webpack -p`
>>
>> npm ERR! Exit status 2
>>
>> npm ERR!
>>
>> npm ERR! Failed at the [email protected] build script.
>>
>> npm ERR! This is probably not a problem with npm. There is likely
>> additional logging output above.
>>
>> Can anyone help me on this ?
>>
>> --
>> Thanks and Best Regards
>> Thisaru Guruge
>> Software Engineer
>> WSO2 Inc.: http://www.wso2.com
>>
>> Mobile: +94 71 720 9720
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>

-- 
Thanks and Best Regards,
Thisaru Guruge
Software Engineer
Mobile: +94 71 720 9720


WSO2 Inc.: http://www.wso2.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to