```TypeError: Module "file:///Users/…/node_modules...
# gooddata-ui
Copy code
TypeError: Module "file:///Users/…/node_modules/@gooddata/sdk-ui/esm/base/localization/bundles/en-US.json" needs an import assertion of type "json"
I also would like to use the React SDK but when I try to follow the steps in https://www.gooddata.com/docs/gooddata-ui/latest/learn/integrate_and_authenticate/cn_and_cloud_integration/ , the moment I use the
component, I encounter the error above. Am I missing something?
Does this error have something to do with me trying to use the SDK in Next.js with swc compiler ?
Hey there, Radek from the GoodData technical team here 🙂 I can't rule it out for the moment, but there is a chance that this is also just due to the missing import assertion when importing the localization JSON - can you give us a little more info on your environment? A package-lock.json paste would be perfect really. Many thanks!
Here’s our yarn.lock. We’re using Yarn v1
Our node version is
I tried adding
assert { type: 'json' };
inside the problematic imports in node_modules but even after that, there’re different errors popping up
Copy code
SyntaxError: Named export 'createSlice' not found. The requested module '@reduxjs/toolkit' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@reduxjs/toolkit';
const { createSlice } = pkg;
👀 1
Hmm, can you double-check your implementation against this article? This should help reduce the chance that Next.js is the culprit here. That said, it might also be worth checking that you're not using SSR, since that actually isn't supported.
No, we aren’t using SSR. Our app is using client side rendering. I’ve already followed all the steps (except step 5 because I’m still developing it locally). Yet in step 8, whenever I try to use the
component, the error I mentioned initially in this thread appears
Did you try to add
Copy code
declare module "*.json" {
    const value: any;
    export default value;