0
我是流星的新手,尝试使用流星与React并按照教程https://www.meteor.com/tutorials/react/collections。 但是我坚持将服务器api/tasks.js文件导入到客户端App.jsx中。我尝试了所有可能的相对路径,但它不起作用。我在浏览器中不断收到错误消息。流星客户端反应app.jsx无法导入服务器api/tasks.js模块
install.js:78 Uncaught Error: Cannot find module './../../../server/imports/api/tasks.js'
以下是API/tasks.js代码参考
import { Mongo } from 'meteor/mongo';
export const Tasks = new Mongo.Collection('tasks');
以下是我的流星命令,它没有与此相关的模块的任何错误。
bash-3.2$ meteor
[[[[[ ~/Dilip/Projects/FindYourLove/SourceCode/FindYourPartner ]]]]]
=> Started proxy.
=> Started MongoDB.
=> Started your app.
=> App running at: http://localhost:3000/
请帮忙。