我是Meteor 1.7的新手,我正在关注simple-todos应用程序的教程。但是,当我添加了react-meteor-data数据包后,它破坏了我的应用程序。我不断得到以下错误消息。
/Users/userName/.meteor/packages/meteor-tool/.1.7.0_3.w8zcf.uowlh++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
throw(ex);
^
TypeError: Class extends value undefined is not a constructor or null
at ReactMeteorData.jsx (packages/react-meteor-data/ReactMeteorData.jsx:162:46)
at fileEvaluate (packages/modules-runtime.js:322:7)
at Module.require (packages/modules-runtime.js:224:14)
at require (packages/modules-runtime.js:244:21)
at createContainer.jsx (packages/react-meteor-data/createContainer.jsx:1:254)
at fileEvaluate (packages/modules-runtime.js:322:7)
at Module.require (packages/modules-runtime.js:224:14)
at require (packages/modules-runtime.js:244:21)
at react-meteor-data.jsx (packages/react-meteor-data/react-meteor-data.jsx:1:139)
at fileEvaluate (packages/modules-runtime.js:322:7)
at Module.require (packages/modules-runtime.js:224:14)
at require (packages/modules-runtime.js:244:21)
at /Users/userName/Sites/drupalvm/sites/Meteor-test-app/.meteor/local/build/programs/server/packages/react-meteor-data.js:331:15
at /Users/userName/Sites/drupalvm/sites/Meteor-test-app/.meteor/local/build/programs/server/packages/react-meteor-data.js:338:3
at /Users/userName/Sites/drupalvm/sites/Meteor-test-app/.meteor/local/build/programs/server/boot.js:411:36
at Array.forEach (<anonymous>)
Exited with code: 1
Your application is crashing. Waiting for file change.
如果有人可以帮助我解决我做错的事情,将不胜感激。
答案 0 :(得分:1)
通常,此错误意味着React已错误地导入了导入withTracker
的文件中。
确保导入行如下所示:
import React, { Component } from 'react';
import { withTracker } from 'meteor/react-meteor-data';