I want to include mobile verification for the users in my app.Tried adding the accounts-phone package ::*$ meteor add okland:accounts-phone *
but error was shown while including that package.
[Edit:1]
*=> Errors while adding packages:
While selecting package versions:
error: Conflict: Constraint npm-bcrypt#=0.7.7 is not satisfied by npm-bcrypt
0.7.8_2.
Constraints on package "npm-bcrypt":
* npm-bcrypt#=0.7.8_2 <- accounts-password 1.1.1
* npm-bcrypt#=0.7.7 <- okland:accounts-phone 0.0.10*
This is a problem with the older versions of bycrpt and the old accounts-base package it depends on. I recently made a pull request to the okland:accounts-phone package which updates accounts-phone to depend on accounts-password and a newer bycrpt version.
Alternatively, if you don't want to wait, you can download his repo locally (okland:accounts-phone) into a packages dir at the root level of your project, and change the packages.js file as such:
Package.describe({
name : 'accounts-phone',
--skipped some lines--
Package.onUse(function (api) {
-api.use('npm-bcrypt#=0.7.8_2', 'server');
+api.use('npm-bcrypt#=0.8.7_1', 'server');
-api.use('accounts-base#1.0.2', ['client', 'server']);
+api.use('accounts-password#1.2.14', ['client', 'server']);
// Export Accounts (etc) to packages using this one.
-api.imply('accounts-base#1.0.2', ['client', 'server']);
+api.imply('accounts-password#1.2.14', ['client', 'server']);
(Make sure to get rid of the '+' and '-', they're just there to indicate what's deleted and what's new). Then, add the local using meteor add accounts-phone'. It will work just fine.
Related
I am trying to update my meteor project from 1.8.2 to the latest version. To do this, I have run meteor update outside of a meteor project and got this message:
The latest version of Meteor, 2.3.6, is already installed on this computer. Run 'meteor update' inside of a particular project directory to update that project to Meteor 2.3.6
After that, I go into my project directory and run the same meteor update and receive this message:
=> Errors while initializing project:
While selecting package versions:
error: No version of standard-minifier-js satisfies all constraints: #2.6.1, #=2.5.0, #~2.6.1
Constraints on package "standard-minifier-js":
* standard-minifier-js#2.6.1 <- top level
* standard-minifier-js#=2.5.0 <- top level
* standard-minifier-js#~2.6.1 <- top level
No version of babel-compiler satisfies all constraints: #=7.4.0, #~7.7.0
Constraints on package "babel-compiler":
* babel-compiler#=7.4.0 <- top level
* babel-compiler#~7.7.0 <- top level
* babel-compiler#7.7.0 <- ecmascript 0.15.3 <- 416serg:simple-text-rotator 0.0.1
I'm not too clear on what the above error message means so if someone could explain that would be amazing. Even better if you've got any tips or ideas to solve this. Please let me know if you need any additional information!
As requested in comment, .meteor/packages:
# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.
# autopublish
# insecure
accounts-ui#1.3.1
accounts-password#1.5.1
# documentation for iron router talks about a higher version.
# but, example todos and others use 0.9.4 which uses routes without a slash(/),
# and actual url is specified on path property.
iron:router#=0.9.4
jquery
underscore#1.0.10
email#1.2.3
alanning:roles
meteor-base#1.4.0
mobile-experience#1.0.5
mongo#1.7.0
blaze-html-templates
session#1.2.0
tracker#1.2.0
logging#1.1.20
reload#1.3.0
random#1.1.0
ejson#1.1.0
spacebars
check#1.3.1
matb33:collection-hooks
# for stripe mrgalaxy:stripe
mrgalaxy:stripe
momentjs:moment
themeteorchef:jquery-validation
http#1.4.2
# for theme
less
twbs:bootstrap#3.3.5
fortawesome:fontawesome
reactive-var#1.0.11
summernote:summernote
dsyko:meteor-node-csv
#force-ssl
peppelg:bootstrap-3-modal
416serg:simple-text-rotator
risul:bootstrap-colorpicker
tomi:upload-jquery
dangrossman:bootstrap-daterangepicker
hellotech:moment-timezone
agnito:simptip
#abhiaiyer:meteor-twilio
jercle:livestamp
#msavin:mongol
tmeasday:publish-counts
kadira:blaze-layout
standard-minifier-css#1.5.4
standard-minifier-js#2.6.1
shell-server#0.4.0
dynamic-import#0.5.1
tomi:upload-server#1.3.4_3
tsega:mentions
montiapm:agent
mizzao:autocomplete
huaming:js-xlsx
edgee:slingshot
mizzao:user-status
I also have a file .meteor/packages~ (not sure what this is or if it's relevant):
# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.
# autopublish
# insecure
accounts-ui
accounts-password
# documentation for iron router talks about a higher version.
# but, example todos and others use 0.9.4 which uses routes without a slash(/),
# and actual url is specified on path property.
iron:router#=0.9.4
jquery
underscore
email
alanning:roles
standard-minifiers
meteor-base
mobile-experience
mongo
blaze-html-templates
session
tracker
logging
reload
random
ejson
spacebars
check
# for stripe mrgalaxy:stripe
mrgalaxy:stripe
momentjs:moment
themeteorchef:jquery-validation
http
# for theme
less
twbs:bootstrap#3.3.5
fortawesome:fontawesome
reactive-var
summernote:summernote
dsyko:meteor-node-csv
#force-ssl
peppelg:bootstrap-3-modal
416serg:simple-text-rotator
risul:bootstrap-colorpicker
tomi:upload-server
tomi:upload-jquery
dangrossman:bootstrap-daterangepicker
It seems that you have all of these in your top-level, i.e., .meteor/packages:
babel-compiler#=7.4.0
babel-compiler#~7.7.0
standard-minifier-js#2.6.1
standard-minifier-js#=2.5.0
standard-minifier-js#~2.6.1
which express version constraints on the named packages. There are no versions for these two packages that satisfy all given constraints. But it seems pretty safe to say that you can reduce this to:
babel-compiler#~7.7.0
standard-minifier-js#2.6.1
but if
babel-compiler#~7.7.0
standard-minifier-js#~2.6.1
works, that would probably save you some trouble down the road, so I would try that first.
If you want to learn more about these constraint expressions, they are Semantic Versioning constraints, i.e., the same as used by npm: https://docs.npmjs.com/cli/v7/configuring-npm/package-json#dependencies.
I keep getting the error in console
W20150601-13:28:19.607(-4)? (STDERR) The spacjamio:chai package has been renamed to practicalmeteor:chai. Please use the new package name instead.
But the spacjamio:chai package has not been added to my project. Why do I keep getting this message?
When I search the hidden meteor build folder I do see a js file for the spacjamio:chai package. Do I just delete this?
Here is my package list
meteor-platform
accounts-password
stylus
mquandalle:jade
coffeescript
sacha:spin
natestrauser:font-awesome
multiply:iron-router-progress
iron:router
alanning:roles
twbs:bootstrap
msavin:mongol
msavin:jetsetter
random
cmather:handlebars-server
email
mrt:moment
themeteorchef:bert
cunneen:mailgun
ian:accounts-ui-bootstrap-3
aldeed:simple-schema
zimme:collection-timestampable
aldeed:collection2
mike:mocha
practicalmeteor:chai
UPDATE:
The error seems to stop when I remove the mike:mocha package. But mike:mocha package seems to require the newest name for chai package.
If you didn't add it and don't need it, I'd just remove it with...
meteor remove practialmeteor:chai
in the console. Worth a shot at least, if it breaks stuff you can always add it back.
I am trying to create a package, but I cannot require npm modules inside the package. This results in a
Cannot find module '..path../crypto'
/packages/s3policy/lib/s3policy.js
crypto = Npm.require('crypto');
S3Policy = {};
S3Policy.readPolicy...
/packages/s3policy/package.js
Npm.depends({
'crypto': '0.0.3'
});
Package.describe({
name: 's3policy',
summary: 'S3 policy API',
version: '0.0.1'
});
Package.on_use(function (api) {
api.add_files('lib/s3policy.js', ['server']);
api.export('S3Policy');
});
Any idea as to why I am unable to require the crypto module?
Maybe this helps?
crypto is a built in node package (http://nodejs.org/api/crypto.html). It doesn't need to be installed. However, the npm crypto package is 2 year old unmaintained code that is often downloaded by mistake (https://www.npmjs.org/package/crypto). Either Meteor or NPM gets confused because the packages have the same name, but it doesn't really matter because you don't want the NPM package.
Just take crypto out of your npm packages and you should be fine.
I have trouble setting up a simple iron:router example: (docs, sample app)
meteor create testapp
cd testapp
home.html:
<template name="Home">
<h1>Welcome</h1>
home
</template>
router.js:
Router.route('/', function () {
this.render('Home'); // Also tried 'home'
});
Starting the server:
meteor
Then I get (client side):
Exception from Tracker recompute function: Error: Couldn't find a template named "/" or "". Are you sure you defined it?
at null._render (http://localhost:3000/packages/iron_dynamic-template.js?32038885cb1dad7957291ffebfffcb7f8cd57d20:239:17)
at doRender (http://localhost:3000/packages/blaze.js?88aac5d3c26b7576ac55bb3afc5324f465757709:1853:25)
...
What am I doing wrong ?
Note: I get the exact same error if I clone the example application (basic.html and basic.js).
meteor list
autopublish 1.0.1 Publish the entire database to all clients
insecure 1.0.1 Allow all database writes by default
iron:router 0.9.4 Routing specifically designed for Meteor
meteor-platform 1.1.2 Include a standard set of Meteor packages in your app
Also:
meteor --version
Meteor 0.9.4 <- Why all standard packages and meteor platform are > 1.0 and this is 0.9.4 ?
Currently, there are two versions of iron:router.
iron:router#0.9.4 is the one added by default when you type meteor add iron:router, this version is the latest in the "legacy" branch of iron:router that came up more than one year ago, it's the one that everyone is probably still using, although they should definitely update to...
iron:router#1.0.0-preX with X = 4 as of 20/10/2014, which is a complete rewrite of the package intended to be backward compatible, but introducing a new, nicer and polished API. This version will likely be set as default when meteor hits 1.0.0 later this year. The problem is that github page of iron:router shows this particular branch (1.0.0-pre4) along with examples that people believe are usable with 0.9.4.
This means that you are most likely using the wrong version of iron router, remove it with meteor remove iron:router and meteor add iron:router#1.0.0-pre4 instead.
Recommended reading to learn about the latest iron:router syntax :
http://eventedmind.github.io/iron-router/
Sometimes the guide is not completely up-to-date with the pre-release version, if you want to keep up with the latest stuff take a look at github issues.
in ~/.meteor/package/ folder all package.js files has only this:
// This file is included for compatibility with the Meteor 0.6.4 package downloader.
and nothing more.
Where is the package.js code?
Thanks!
The package system has changed.
You will find the auto-generated file you're refering to under:
/packages/name_of_your_package/.build/
As for where the actual 'package.js' file is, it's under
/packages/name_of_your_package/
As per the source code that's building these files for you:
// Pre-linker versions of Meteor expect all packages in the warehouse to
// contain a file called "package.js"; they use this as part of deciding
// whether or not they need to download a new package. Because packages
// are downloaded by the *existing* version of the tools, we need to
// include this file until we're comfortable breaking "meteor update" from
// 0.6.4. (Specifically, warehouse.packageExistsInWarehouse used to check
// to see if package.js exists instead of just looking for the package
// directory.)
// XXX Remove this once we can.
builder.write("package.js", {
data: new Buffer(
("// This file is included for compatibility with the Meteor " +
"0.6.4 package downloader.\n"),
"utf8")
});
I hope this helps!