Meteor-Boilerplate-Webpack-Mantra-Typescript icon indicating copy to clipboard operation
Meteor-Boilerplate-Webpack-Mantra-Typescript copied to clipboard

Example app doesn't work: "Component not found"

Open swennemans opened this issue 9 years ago • 4 comments

I try to run the example, but it doesn't start. The error is:

Uncaught TypeError: Cannot read property 'Component' of undefined

Any ideas? It seems that React is imported.

swennemans avatar Feb 24 '16 08:02 swennemans

Yes, I just bumped into that. There is some issue with React itself and I reported it to @eXon

For now, please do

import { Component } from "react" instead of import React from "react"

I will update the project as soon as possible.

tomitrescak avatar Feb 24 '16 08:02 tomitrescak

I've ported my existing Mantra project to Webpack, and made some changes. And everything works as expected. From what I can see the only thing I do differently is importing React from NPM, defined in webpack.packages.json

Hope it helps.

swennemans avatar Feb 24 '16 11:02 swennemans

Can you maybe do a PR, or you did not use boilerplate at all?

tomitrescak avatar Feb 24 '16 11:02 tomitrescak

Sorry I didn't use the boilerplate at all.

swennemans avatar Feb 26 '16 11:02 swennemans