question

Upvotes
Accepted
1 0 1 1

refinitiv-ui/elements fails to compile

React app using today's version of refinitiv-ui/elements doesn't compile. Please supply the correct incantation.

Failed to compile.


./node_modules/@refinitiv-ui/elements/lib/button/index.js
Module not found: Can't resolve '@refinitiv-ui/core/decorators/custom-element.js' in '/Users/mark/repos/luvurwork/luvurwork-react-spike/nexus-react-ui/node_modules/@refinitiv-ui/elements/lib/button'

node v16.16

node v8.16.0

yarn v1.22.19

react v17.0.2

The following imports are in my app.js:

// Refinitiv-ui imports - themes must be imported to use the elements

import '@refinitiv-ui/elements/lib/loader';

import '@refinitiv-ui/elements/lib/button';

import '@refinitiv-ui/elements/lib/panel';

import '@refinitiv-ui/elements/lib/text-field';

import '@refinitiv-ui/elements/lib/password-field';

import '@refinitiv-ui/elements/lib/sparkline';

import '@refinitiv-ui/halo-theme/dark/imports/native-elements';

import '@refinitiv-ui/elements/lib/loader/themes/halo/dark';

import '@refinitiv-ui/elements/lib/button/themes/halo/dark';

import '@refinitiv-ui/elements/lib/panel/themes/halo/dark';

import '@refinitiv-ui/elements/lib/text-field/themes/halo/dark';

import '@refinitiv-ui/elements/lib/password-field/themes/halo/dark';

import '@refinitiv-ui/elements/lib/sparkline/themes/halo/dark';



compile
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @mark.green01 ,

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Dear @mark.green01


Please be informed that a reply has been verified as correct in answering the question, and marked as such.


Thanks,


AHS

1 Answer

· Write an Answer
Upvotes
Accepted
79.2k 251 52 74

@mark.green01

I followed the steps mentioned in the React Guide.

I got the following errors when running "npm install @refinitiv-ui/elements" and "npm install @refinitiv-ui/halo-theme".

1659945455630.png

Then, I am unable to run the application with the "Module not found" errors.

Failed to compile.

Module not found: Error: Can't resolve '@refinitiv-ui/utils/accessibility/label.js' in 'C:\Users\U8009686\node_modules\@refinitiv-ui\core\lib\elements'
ERROR in ../../node_modules/@refinitiv-ui/core/lib/elements/FormFieldElement.js 3:0-81
Module not found: Error: Can't resolve '@refinitiv-ui/utils/accessibility/label.js' in 'C:\Users\U8009686\node_modules\@refinitiv-ui\core\lib\elements'

ERROR in ../../node_modules/@refinitiv-ui/core/lib/elements/FormFieldElement.js 4:0-99
Module not found: Error: Can't resolve '@refinitiv-ui/utils/accessibility/description.js' in 'C:\Users\U8009686\node_modules\@refinitiv-ui\core\lib\elements'

ERROR in ../../node_modules/@refinitiv-ui/core/lib/elements/FormFieldElement.js 5:0-90
Module not found: Error: Can't resolve '@refinitiv-ui/utils/accessibility/required.js' in 'C:\Users\U8009686\node_modules\@refinitiv-ui\core\lib\elements'

ERROR in ./node_modules/@refinitiv-ui/elements/lib/button/index.js 8:0-68
Module not found: Error: Can't resolve '@refinitiv-ui/utils/element.js' in 'C:\Users\U8009686\refinitiv-ui\my-app\node_modules\@refinitiv-ui\elements\lib\button'

ERROR in ./node_modules/@refinitiv-ui/elements/lib/icon/utils/IconLoader.js 1:0-58
Module not found: Error: Can't resolve '@refinitiv-ui/utils/loader.js' in 'C:\Users\U8009686\refinitiv-ui\my-app\node_modules\@refinitiv-ui\elements\lib\icon\utils'

ERROR in ./node_modules/@refinitiv-ui/elements/lib/overlay/elements/overlay.js 7:0-84
Module not found: Error: Can't resolve '@refinitiv-ui/utils/async.js' in 'C:\Users\U8009686\refinitiv-ui\my-app\node_modules\@refinitiv-ui\elements\lib\overlay\elements'

I need to manually install the following modules.

npm install @refinitiv-ui/utils
npm install @refinitiv-ui/core
npm install @refinitiv-ui/i18n
npm install @refinitiv-ui/phrasebook
npm install @refinitiv-ui/translate

Next, the application can start properly.

1659945726380.png

According to the error, you may not install the @refinitiv-ui/core module.

I am using @refinitiv-ui/elements@6.0.4.


1659945455630.png (68.0 KiB)
1659945726380.png (8.0 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.