I'm trying to run a local package on Meteor.
I've got a correct package.js, have a smart.json, and it's inside my /packages directory in my Meteor project. The smart.json at my project looks like this:
{ "packages": { "router": {}, "userErrors": { "path": "/home/user/Documents/project/packages/userErrors" } } }
And I am using api.add_files and all correctly. The code runs fine when I take it out of the packages folder. Is there something I'm missing in order to make this package run? I'm running Meteor with the mrt
command.
If your app is running when you add a new package, Meteor will automatically download it and restart your app for you. The actual files for a given version of an Atmosphere package are stored in your local ~/. meteor/packages directory.
To use an npm package from a file in your application you import the name of the package: import moment from 'moment'; // this is equivalent to the standard node require: const moment = require('moment'); This imports the default export from the package into the symbol moment .
The Meteor build tool is what compiles, runs, deploys, and publishes all of your Meteor apps and packages. It's Meteor's built-in solution to the problems also solved by tools like Grunt, Gulp, Webpack, Browserify, Nodemon, and many others, and uses many popular Node.
try to put your files in the 'packages' directory of your app and execute : meteor add [package-name]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With