Hey guys, While I want to build the new spa-sdk-react example I recieve an error. Failed to load plugin ‘prettier’ declared in ‘package.json » @bloomreach /eslint-config-react » @bloomreach /eslint-config-base’: Cannot find module ‘eslint-plugin-prettier’
Require stack:
C:\Users\nataliia.karpenko\Documents\projects\sdk-bloomreach\spa-sdk\node_modules\react-scripts\config_placeholder _.js
How can I start new react-sdk project? What I am missing?
Hi @Iryna_Alchynska ,
The SDK repository is a monorepo, so you can’t run the example projects by themselves.
I would recommend the below steps Installation :
Clone the entire repository (GitHub - bloomreach/spa-sdk )
In the root folder, run npm ci
and then npm run build
. This will install all of the dependencies for each of the example projects.
In the example react project folder, you can run npm run dev
to start the project.
1 Like
machak
March 22, 2023, 2:32pm
3
to build a single example check:
Hi @erictheun ,
The engines property in the package.json file in the root of the repository specifies that you need node 14 or 16 to run the repo. We simply have not tested it with node 18 yet.
I suggest to read the root README.md on how to work with the repository. For example you will need to run npm ci in the root and npm run build to build all the artifacts (or at least the react ones with npx lerna run build --scope @bloomreach/example-react --include-dependencies --stream) before you can …
@Iryna_Alchynska what my colleagues above have provided is true if you intend to build also the SDK packages for development.
For what you are interested as per my email you can add in your .env file
DISABLE_ESLINT_PLUGIN=true
Replying also here for future reference.
Kind regards
1 Like
When In the root folder I run npm ci
and then npm run build
I receive the error, so cannot run “npm run dev” , just tried it again and the same error.
This fixed my issue, thanks