Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with react-fontawesome #152

Closed
bduff9 opened this issue Jan 16, 2022 · 2 comments · Fixed by #155
Closed

Error with react-fontawesome #152

bduff9 opened this issue Jan 16, 2022 · 2 comments · Fixed by #155

Comments

@bduff9
Copy link

bduff9 commented Jan 16, 2022

Hello! Unsure if this goes in miniflare or react-fontawesome, but since react-fontawesome works with version 2.0.0 of miniflare and fails with version 2.1.0, I am starting here.

Essentially, I have a remix project where I try adding a font awesome component to it. Immediately, it fails on load with this error:

TypeError: Cannot convert undefined or null to object
    at Function.getPrototypeOf (<anonymous>)
    at ordinaryHasInstance (/Users/bduffey2/projects/test-remix/node_modules/@miniflare/runner-vm/src/instanceof.ts:99:22)
    at instanceOf (/Users/bduffey2/projects/test-remix/node_modules/@miniflare/runner-vm/src/instanceof.ts:114:5)
    at Function.value (/Users/bduffey2/projects/test-remix/node_modules/@miniflare/runner-vm/src/instanceof.ts:139:14)
    at checkPropTypes (/Users/bduffey2/projects/test-remix/node_modules/react/cjs/react.development.js:1929:13)
    at validatePropTypes (/Users/bduffey2/projects/test-remix/node_modules/react/cjs/react.development.js:2136:7)
    at Object.createElementWithValidation (/Users/bduffey2/projects/test-remix/node_modules/react/cjs/react.development.js:2240:5)
    at Index (/Users/bduffey2/projects/test-remix/build/route-module:/Users/bduffey2/projects/test-remix/app/routes/index.tsx:7:11)
    at processChild (/Users/bduffey2/projects/test-remix/node_modules/react-dom/cjs/react-dom-server.browser.development.js:3352:14)
    at resolve2 (/Users/bduffey2/projects/test-remix/node_modules/react-dom/cjs/react-dom-server.browser.development.js:3269:5)

If I downgrade to miniflare 2.0.0, the error goes away and the icon shows as expected. To reproduce, you can create a new remix project with npx create-remix@latest. Then, upgrade miniflare to 2.1.0 and add the font awesome deps to your package.json with npm i --save @fortawesome/fontawesome-svg-core @fortawesome/free-regular-svg-icons @fortawesome/react-fontawesome. Finally, load any icon on the index route (such as <FontAwesomeIcon icon={faCheckCircle} />) and open the app in a browser. Let me know if I can provide more information. Thanks!

@g45t345rt
Copy link

Same here with 2.1.0
[mf:err] GET /: TypeError: Cannot convert undefined or null to object

The error goes away if I downgrade to 2.0.0

@mrbbot mrbbot linked a pull request Jan 18, 2022 that will close this issue
@mrbbot
Copy link
Contributor

mrbbot commented Jan 18, 2022

Hey! 👋 I've just released version 2.2.0 including a fix for this. You can find the full changelog here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants