1

I am trying to run npx create-react-app my-safe-app --template @gnosis.pm/cra-template-safe-app but I am getting this error.

I'm just following the instructions at https://github.com/safe-global/safe-apps-sdk/tree/master/packages/cra-template-safe-app

Please advise :)

I tried to bootstrap a safe app and getting this error

2 Answers 2

1

You have a mismatch version with @testing-library/@react13.4.0 and my-safe-app@0.1.0 when installing, you should try upgrade the version of everything to latest and try it again.

Other option could be upgrade your version of nodejs.

In the worst case, you can run the installation ignoring outdated packages, try with the flags --legacy-peer-deps.

$ npx create-react-app my-safe-app --template @gnosis.pm/cra-template-safe-app --legacy-peer-deps
2
  • Ok that got me to the next error... now it's giving me trouble because react is TOO up to date? Error here: imgur.com/a/yhHok7k
    – Brentable
    Nov 12, 2022 at 2:19
  • Delete node modules and package-lock.json and then run npm install again, it seems you have node_modules mismatching new version with old version of some dependencies, try it and let me know, because it is the issue. @Brentable Nov 12, 2022 at 2:46
1

Hi I'm also running into the same issue and receive the same output when attempting to run

$ npx create-react-app my-safe-app --template @gnosis.pm/cra-template-safe-app --legacy-peer-deps

It appears there is potentially an issue with the version here.

https://github.com/safe-global/safe-apps-sdk/blob/master/packages/cra-template-safe-app/template.json#L15

see https://github.com/testing-library/react-testing-library/issues/1121#issuecomment-1242335979 for example. Let me know your thoughts, thanks!

Update: The following works.

  1. npx create-react-app drain-safe --template @gnosis.pm/cra-template-safe-app@4.1.1

  2. Remove related font code here https://github.com/safe-global/safe-apps-sdk/pull/388/files#diff-68c12a430f865c61eee3d09fe68f486c048af196cf7a2b347f0c5105c94f01c8L1-L2.

  3. npm start (or yarn)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.