What is the correct way to import the Future object from fibers/future. I have the feeling that I should not be doing an npm install for the latest version, I should be using the version already packaged with Meteor instead.
I realize I can do: const Future = Npm.require('fibers/future'),
but is Npm.require deprecated in favor of doing this somehow with es6 syntax?
The same question would go for accessing the raw MongoDB node driver packaged with Meteor…
I ran into what seems like a related problem when switching from an atmosphere package to an NPM package (uploadcare-widget). The package references images in the folder node_modules/uploadcare-widget/images. The images are displayed on the page via css, for example:
I can see my app attempt to load the images from the network inspector, but the image doesn’t load from the displayed path. I can confirm that image files are in the specified file directory. Is there something special I need to do to be able to load images from an npm package?
I haven’t messed around a lot with Promises, Fibrers and Async stuff yet and I really with there would be some more guidance in the guide.
I WISH there would be a sashko-quality (@sashko) best-practice summary of Start using async/await instead of promises and callbacks, especially dealing with Meteor.call()-related stuff. Just a bit more of details in the Promises example might really help saving some time and making the code more readable.
In the discussion of npm shrinkwrap, Is “meteor npm install --save moment” just an example, or is it required by something (e.g. shrinkwrap or meteor). From the text, it appears that shrinkwrap requires moment…
Also, why does “meteor npm shrinkwrap” produce a bunch of “extraneous” messages that reference “node_modules\meteor-node-stubs\node_modules\minimatch” and what to do about them? The shrinkwrap.json file is not updated in this case, so I can’t just ignore these messages. But doing (for example) “meteor npm uninstall minimatch” doesn’t help.
Additional info: I just upgraded to meteor 1.5.1 from meteor 1.4.something, on Windows 8.1. “meteor npm shrinkwrap” worked for me on the previous version of meteor.
I’m having an odd issue with importing npm modules and would appreciate some guidance from people who know better. Before Meteor properly supported npm, the solution was to use Npm.require('libname'). Now that the support is in there, we’re supposed to just use require 'libname or import Lib from 'libname'.
However, there are a few npm packages where that fails. Our app uses googleapis, google-auth-library, and quickbase. When we bring in those libraries via import or require, we get weird errors that all go away when we drop back to using Npm.require. quickbase says we need to "use strict";, which seems like an ES5 issue we shouldn’t be having, while googleapis allegedly can’t be found in node_modules.
Our build system is mildly atypical because we’re using meteorcom:webpack (successor to webpack:webpack), not sure if that has anything to do with it.
Any ideas from the community? I never really understood what sort of magic Npm.require was doing under the hood, but it looks like it’s still occasionally necessary even though Meteor allegedly doesn’t need it anymore. Is there a good GitHub repo for me to leave this as an issue?
Meteor awesome would be cool. That is for example some of the dev packages are a must like constellation (babrahams…), compilation error overlays by stubailo, reval, compass mongo.