I talk about this guide: <INTERNAL_LINK>
I just tried to follow the Widgets Quick Start Guide (that is a great thing!). Some thoughts & problems I encountered:
- I had to set up my Artifactory access and create my
.npmrcand this was a bit challenging, as I didn’t have my Artifactory account data at hand. The “Forgot Password” process of Artifactory doesn’t work. - Creating the react app: I think it’s nowadays better to avoid installing global packages as they are not controlled by the project’s pkackage.json. Therefore it’s probably better to use
npx install -g create-react-app create-react-app hello-widgets --scripts-version=react-scripts-ts
- When installing the A12 DevTools and Widgets, is it meant to be without the
-soption? Or thesave-devoption? - The guide says Widgets is built on react and react-dom 16.4.2, so we recommend you to also install these versions.. In my case it had installed higher versions already:
"react": "^16.7.0",
"react-dom": "^16.7.0",
Is the guide already outdated?
- When I replaced the App.tsx with the suggested code, my React App didn’t work anymore and showed the following error:
Failed to compile
/Users/tgartner/git/hello-widgets/src/App.tsx
(2,1): Import sources within a group must be alphabetized.
To fix this I sorted the imports. This lead to the next error:
Failed to compile
/Users/tgartner/git/hello-widgets/src/App.test.tsx
(1,24): ' should be "
By now I fixed all the problems. Since your linter is a Nazi (i.e. very strict), you should mention in your guide some seetings needed in the editor:
- Quotes should be " not ’
- Use Tabs instead of blanks
Thank you very much for this great Getting Started tutorial, it’s really great!!