danott / react-rails-form-helpers

Components for composing forms targeted at Rails
MIT License
81 stars 18 forks source link

Missing react import #11

Closed babgyy closed 6 years ago

babgyy commented 6 years ago

I am very excited to use this package in my Rails project with Webpacker and NPM, but I have some errors with React not being defined :

Uncaught ReferenceError: React is not defined
    at LabelTag (tags.js:55)
    at mountIndeterminateComponent (react-dom.development.js:8574)
    at beginWork (react-dom.development.js:8978)
    at performUnitOfWork (react-dom.development.js:11814)
    at workLoop (react-dom.development.js:11843)
    at HTMLUnknownElement.callCallback (react-dom.development.js:100)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:138)
    at invokeGuardedCallback (react-dom.development.js:187)
    at replayUnitOfWork (react-dom.development.js:11318)
    at renderRoot (react-dom.development.js:11885)

I saw this pull-request was merged 2 months ago, but last publication NPM was 6 months ago.

Cloning from master, building and linking the package locally did work, but won't do good in production.

I am not sure what is advised here :

  1. kindly ask you to publish a new version ?
  2. fork and publish a new version on NPM ?
  3. link directly to github from package.json ? I tried this, but the package is not built and I do not know if I can instruct yarn / npm to build it

I apologize as this is not exclusively related to this repo, but I thought future readers might benefit from this too. Thanks

danott commented 6 years ago

Whoops! A merge doesn't help anybody if I forget to publish. I published 0.1.0-beta.15 moments ago. If that doesn't work, open this back up and we'll figure it out. Thanks for reporting the problem.

babgyy commented 6 years ago

Thanks for the quick reply,

However I don't see 0.1.0-beta.15 on npmjs nor on unpkg

I am not sure how long this is supposed to take. Also, I apparently can't re-open an issue you closed

danott commented 6 years ago

Whoops again. I ran npm publish than assumed it work. Turns out I've never authenticated on that machine, so it wasn't able to publish. Published now, and confirmed by viewing https://www.npmjs.com/package/react-rails-form-helpers. Thanks for the patience!