Issues like these are exactly why i am staying at 1.2.1
There is apparently no documentation on how to get these things resolved properly. I don’t understand how they say 1.3 is backwards compatible when it’s breaking for 90% of my projects.
@ixdi
Don’t have exactly the same problem (still in process of updating to 1.3), but here some clues from official guide:
npm on the client
Tools like browserify and webpack are designed to provide a Node-like environment on the client so that many npm packages, even ones originally intended for the server, can run unmodified. Meteor’s ES2015 module system does this for you out of the box with no additional configuration necessary. In most cases, you can simply import npm dependencies from a client file, just as you would on the server.
When creating a new application Meteor installs the meteor-node-stubs npm package to help provide this client browser compatibility. If you are upgrading an application to Meteor 1.3 you may have to run meteor npm install --save meteor-node-stubs manually.
I’ve installed meteor-node-stubs but nothing changed, result is the same: TypeError: $(…).spectrum is not a function
thanks, I’m using an atmosphere package, at least for now.
This is a known issue. In 1.3.2, the jQuery package provided by Meteor core will be deprecated in favour of the official NPM version. Take a look at this issue for more details.
Late to the game here but I’m struggling with this as well. I’m attempting to use the package simplebarfound here. All of the above recommendations have failed for me saying$(...).simplebar is undefined.
I have installed it with:
meteor npm install --save simplebar
The multiple ways of require() or import consistently fail.
@tmeasday I can’t find a mention in the guid about how to do this. Jquery plugins fail on a new 1.3 project. (projects upgraded to 1.3 from 1.2 seem ok).
import autogrow from “autogrow” seems to have worked for https://www.npmjs.com/package/autogrow, even though the variable autogrow is never used, it just runs the code that imports the proper functions in jquery.
(Just adding it now as I had to search for a while as well and ended up on this page full of questions!)