So I’m having an odd issue where my development laptop is running the project fine, my work PC is running fine, but I am trying to set up the same project on my home PC and it’s giving me issues.
I used the suggestions linked in the Grapher documentation for adding all db files to an index and importing the index. But it’s telling me the collections don’t exist, despite the index being imported.
Here’s a sample that’s not working using some of the tutorial data:
main.js
import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';
import '/imports/db/index.js';
const insertTask = (taskText, user) =>
TasksCollection.insert({
text: taskText,
userId: user._id,
createdAt: new Date(),
});
/imports/db/index.js:
import {TasksCollection} from "./tasks/TasksCollection";
import './links';
TasksCollection.js
import { Mongo } from 'meteor/mongo';
export const TasksCollection = new Mongo.Collection('tasks');
This results in ReferenceError: TasksCollection is not defined
Really confusing me as to why this is working fine on the other 2 PC’s and it’s giving this one problems? I’ve installed all of them from the same project with GitHub. Have the laptop on my lap right now and did a meteor reset and it’s not giving this error? How could that be?