meteor-sharejs icon indicating copy to clipboard operation
meteor-sharejs copied to clipboard

ShareJS not defined in Meteor 1.6

Open iwojapa opened this issue 7 years ago • 10 comments

I get the following error when I try to use ShareJS in Meteor 1.6.

W20171204-11:23:01.111(-8)? (STDERR) /Users/iwojtowicz/.meteor/packages/meteor-tool/.1.6.0.18n9mub++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
W20171204-11:23:01.112(-8)? (STDERR) 						throw(ex);
W20171204-11:23:01.112(-8)? (STDERR) 						^
W20171204-11:23:01.112(-8)? (STDERR) 
W20171204-11:23:01.112(-8)? (STDERR) ReferenceError: ShareJS is not defined
W20171204-11:23:01.112(-8)? (STDERR)     at sharejs-server.js (packages/mizzao:sharejs/sharejs-server.js:8:24)
W20171204-11:23:01.113(-8)? (STDERR)     at fileEvaluate (packages/modules-runtime.js:343:9)
W20171204-11:23:01.113(-8)? (STDERR)     at require (packages/modules-runtime.js:238:16)
W20171204-11:23:01.113(-8)? (STDERR)     at /Users/iwojtowicz/Documents/Projects/Misc/Design Cards/Source Code/.meteor/local/build/programs/server/packages/mizzao_sharejs.js:126:15
W20171204-11:23:01.113(-8)? (STDERR)     at /Users/iwojtowicz/Documents/Projects/Misc/Design Cards/Source Code/.meteor/local/build/programs/server/packages/mizzao_sharejs.js:132:3
W20171204-11:23:01.114(-8)? (STDERR)     at infos.forEach.info (/Users/iwojtowicz/Documents/Projects/Misc/Design Cards/Source Code/.meteor/local/build/programs/server/boot.js:414:13)
W20171204-11:23:01.114(-8)? (STDERR)     at Array.forEach (<anonymous>)
W20171204-11:23:01.114(-8)? (STDERR)     at /Users/iwojtowicz/Documents/Projects/Misc/Design Cards/Source Code/.meteor/local/build/programs/server/boot.js:413:9
W20171204-11:23:01.114(-8)? (STDERR)     at /Users/iwojtowicz/Documents/Projects/Misc/Design Cards/Source Code/.meteor/local/build/programs/server/boot.js:463:5
W20171204-11:23:01.114(-8)? (STDERR)     at Function.run (/Users/iwojtowicz/Documents/Projects/Misc/Design Cards/Source Code/.meteor/local/build/programs/server/profile.js:510:12)

I installed it with meteor add mizzao:sharejs

The demo app from the repo works fine, but breaks if I run meteor update.

iwojapa avatar Dec 04 '17 19:12 iwojapa

You just need to add a line of JavaScript:

import { ShareJS } from 'meteor/mizzao:sharejs'

edemaine avatar Dec 13 '17 21:12 edemaine

I'm getting the same error. That line doesn't fix it either.

ghost avatar Dec 14 '17 22:12 ghost

Where did you add it? You need to make sure it's getting executed before ShareJS gets used. Do you get a different error?

I haven't tried the demo in a while, but I can confirm that this package works (in my own project) with Meteor 1.6.

edemaine avatar Dec 15 '17 13:12 edemaine

I added it to the packages and I haven't added it to any templates. It's the same error.

W20171215-12:26:26.527(-8)? (STDERR) /home/.meteor/packages/meteor-tool/.1.6.0_1.ff6ofd.xp1u++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280 W20171215-12:26:26.529(-8)? (STDERR) throw(ex); W20171215-12:26:26.529(-8)? (STDERR) ^ W20171215-12:26:26.530(-8)? (STDERR) W20171215-12:26:26.530(-8)? (STDERR) ReferenceError: ShareJS is not defined W20171215-12:26:26.531(-8)? (STDERR) at sharejs-server.js (packages/mizzao:sharejs/sharejs-server.js:8:24) W20171215-12:26:26.531(-8)? (STDERR) at fileEvaluate (packages/modules-runtime.js:343:9) W20171215-12:26:26.532(-8)? (STDERR) at require (packages/modules-runtime.js:238:16) W20171215-12:26:26.533(-8)? (STDERR) at /media/files/application/election/.meteor/local/build/programs/server/packages/mizzao_sharejs.js:126:15 W20171215-12:26:26.533(-8)? (STDERR) at /media/files/application/election/.meteor/local/build/programs/server/packages/mizzao_sharejs.js:132:3 W20171215-12:26:26.534(-8)? (STDERR) at infos.forEach.info (/media/files/application/election/.meteor/local/build/programs/server/boot.js:414:13) W20171215-12:26:26.534(-8)? (STDERR) at Array.forEach (<anonymous>) W20171215-12:26:26.535(-8)? (STDERR) at /media/files/application/election/.meteor/local/build/programs/server/boot.js:413:9 W20171215-12:26:26.536(-8)? (STDERR) at /media/files/application/election/.meteor/local/build/programs/server/boot.js:463:5 W20171215-12:26:26.536(-8)? (STDERR) at Function.run (/media/files/application/election/.meteor/local/build/programs/server/profile.js:510:12)

ghost avatar Dec 15 '17 20:12 ghost

Oops, sorry, I'm mixing up version upgrades. You're right, this is broken. PR #94 fixes this issue. You can also replace package mizzao:sharejs with edemaine:sharejs in the meanwhile (which also includes PR #93).

edemaine avatar Dec 15 '17 20:12 edemaine

That's what I ended up doing to get this working.

Nice work on the time traveller conference, by the way. Legendary.

iwoj avatar Dec 15 '17 20:12 iwoj

@iwoj Did you attend the time traveler convention recently? ;-) It was awesome participating!

edemaine avatar Dec 17 '17 15:12 edemaine

I go back from time to time.

iwoj avatar Dec 18 '17 17:12 iwoj

is this being fix ?

evanoralph avatar Feb 10 '18 02:02 evanoralph

Great! I removed mizzao:sharejs and used edemaine:sharejs, now it works!

filston2006 avatar Feb 13 '18 12:02 filston2006