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.jsModule 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';;
@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".
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-81Module 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-99Module 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-90Module 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-68Module 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-58Module 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-84Module 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/utilsnpm install @refinitiv-ui/corenpm install @refinitiv-ui/i18nnpm install @refinitiv-ui/phrasebooknpm install @refinitiv-ui/translate
Next, the application can start properly.
According to the error, you may not install the @refinitiv-ui/core module.
I am using @refinitiv-ui/elements@6.0.4.