@henrybuilt/react-lib

1.0.21 • Public • Published

hb-react-lib

Development

Getting Started

  1. cd ~/repos
  2. git clone https://github.com/henrybuilt/hb-react-lib.git
  3. cd ~/repos/hb-react-lib
  4. npm i

Local development with npm link

  1. cd ~/repos/hb-react-lib
  2. npm link
  3. npm run watch, this will rebuild your ~/repos/hb-react-lib/dist as you make changes locally
  4. rm -rf ./node_modules/react, we remove the /react dir from ./node_modules to prevent conflicts with the target repo we wish to npm link with hb-react-lib
  5. cd ~/repos/target-repo, where "target-repo" is the repo in which you wish to use @henrybuilt/react-lib
  6. npm link @henrybuilt/react-lib

Troubleshooting

  1. If npm run build results in TypeError: Unknown file extension ".json", try the following:

    • See this stack-overflow for more information.

    • Run node --experimental-json-modules ./node_modules/.bin/rollup -c

  2. If using npm link and you get the following error message in the repo where you're linking @henrybuilt/react-lib,

    Uncaught TypeError: Cannot read properties of null (reading 'useState')

    run the following commands in hb-react-lib directory:

    a. rm -rf ./node_modules/react b. rm -rf ./node_modules/react-dom

    This can occur if you recently ran npm i inside hb-react-lib.

Package Sidebar

Install

npm i @henrybuilt/react-lib

Weekly Downloads

1

Version

1.0.21

License

ISC

Unpacked Size

3.8 MB

Total Files

70

Last publish

Collaborators

  • maxhudson
  • chrisbugge
  • joplever