ritzy
December 26, 2017, 8:44pm
1
Hi,
I am unable to integrate the latest version of react with my meteor code.
The meteor version I’m using is: Meteor 1.6.0.1.
Here is the link for the gist which contains the error stack and a sample file on client side.
Error on console
W20171227-01:42:26.871(5.5)? (STDERR) WARNING: npm peer requirements (for thereactivestack:blazetoreact) not installed:
W20171227-01:42:27.565(5.5)? (STDERR) - react@16.2.0 installed, react@15.x needed
W20171227-01:42:27.567(5.5)? (STDERR)
W20171227-01:42:27.568(5.5)? (STDERR) Read more about installing npm peer dependencies:
W20171227-01:42:27.569(5.5)? (STDERR) http://guide.meteor.com/using-packages.html#peer-npm-dependencies
W20171227-01:42:27.570(5.5)? (STDERR)
W20171227-01:42:27.582(5.5)? (STDERR) C:\Users\Rajendra\AppData\Local\.meteor\packages\meteor-tool\1.6.0_1\mt-os.windows.x86_64\dev_bundle\server-lib\node_modules\fibers\future.js:280
W20171227-01:42:27.584(5.5)? (STDERR)
throw(ex);
W20171227-01:42:27.586(5.5)? (STDERR)
This file has been truncated. show original
One with withTracker()
import React, { Component } from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import Checkbox from '../../utilities/Checkbox';
import { I18n, translate } from 'react-i18next';
class ManageUsers extends Component{
componentWillMount = () => {
this.selectedUsers = new Set();
This file has been truncated. show original
Sample ReactJS file
import React, { Component } from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import uploadsCollection from '../../../../lib/files.js';
class AddNewUser extends Component{
componentWillMount = () => {
this.state = {file: null,
upload: false,
firstNameValue: '',
This file has been truncated. show original
There are more than three files. show original
Basically, I’m getting this error:
TypeError: React.createClass is not a function
I’m not using createClass at all and still seeing this error.
Can anyone help me with this?
Have been trying to work with React 16 and Meteor since long.
Right there is your answer. You have thereactivestack:blazetoreact
which requires react 15 and most likely uses the createClass
method which is no longer available. Start with updating or replacing that dependency.
ritzy
December 27, 2017, 9:12am
3
Hey @storyteller , thanks for the reply.
I haven’t downloaded this dependency manually.
Can you please tell me how I can update this or change it to something else?
Then you will have to figure out which of your dependency uses it.
According to Atmosphere the only dependent is okgrow:accounts-ui-react,
so try updating that if you have it.
https://atmospherejs.com/thereactivestack/blazetoreact
ritzy
December 27, 2017, 9:41am
5
Thanks a lot. I’ll try this tonight and share my findings.
2 Likes
ritzy
March 22, 2018, 3:54pm
6
Hey, sorry for such a late reply.
I was able to use the latest version of React after removing the okgrow:accounts-ui-react package.
Thanks once again for this @storyteller
1 Like
Oh, this React journey
Almost like travelling on a roller coaster…