Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing a local package on Meteor

Tags:

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.

like image 443
Xiv Avatar asked Aug 20 '13 06:08

Xiv


People also ask

Where are Meteor packages installed?

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.

How use NPM package Meteor?

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 .

What does Meteor build do?

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.


1 Answers

try to put your files in the 'packages' directory of your app and execute : meteor add [package-name]

like image 160
Ronald Pauffert Avatar answered Oct 28 '22 07:10

Ronald Pauffert