SyntaxError: Unexpected reserved word:import {Mongo} from 'meteor/mongo';

I got this error that does not let my app to run correctly in azure, but it runs correctly on herokuapp;

could you help to fixe it please?

/Users/moe-talos/koufa_complet/.meteor/local/build/programs/server/app/app.js:1592
import {Mongo} from 'meteor/mongo';
^^^^^^   
   
SyntaxError: Unexpected reserved word
     at Object.exports.runInThisContext (vm.js:53:16)
     at /Users/moe-talos/koufa_complet/.meteor/local/build/programs/server/boot.js:292:30
     at Array.forEach (native)
     at Function._.each._.forEach (/Users/moe-talos/.meteor/packages/meteor-tool/.1.4.0.1ug35iv++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
     at /Users/moe-talos/koufa_complet/.meteor/local/build/programs/server/boot.js:133:5

=> Exited with code: 1                        
=> Your application is crashing. Waiting for file change.

any one to help here, please

those more additional logs

http://paste.ofcode.org/VVGYBc5yAJRRty5VYFH2Xs
http://paste.ofcode.org/7NTuffRHHTDKZgGqxMFw2a

@benjamn can you help please

You’ll receive more help on the forums if you provide better information to work with.

I don’t know where to start since the information you’ve provided appears to be from different environments (that log appears to be from a Mac, but then your other logs are from Azure command line and you’ve included some HTML code from Windows Server IIS 404 pages as well?). Please focus on one problem at a time instead of providing partial output from your development environment, some from a web-browser and some from the server.

Realistically, it’s probably best to start with development before dealing with deployed issues but I’m guessing there are multiple errors here:

  • In development, make sure you have the ecmascript package installed (meteor add ecmascript).

  • In production, make sure you’re using the correct versions of Node and NPM. Your log indicates you’re using Node 0.10 and NPM v1 (which is incredibly old).

Anyhow, if this doesn’t solve it, you need to provide a better reproduction and explanation.

1 Like

@abernix thank’s for your help, I use an adequat version of node and npm, so I can deploy it on azure (link: elkoufa ); however the page is still blanck , does not display anything; the log of error is here log.

Thank’s for your help

Please take the time to read the log; this new log explains the problem very clearly. It may take time to figure out what’s wrong, but debugging takes time. :slight_smile:

It will be easier if you debug it in development and not in production, but the two most important lines here are

Error: key emails.address must not contain '.'
...skip to the last line...
    at D:\home\site\wwwroot\programs\server\packages\accounts-base.js:1983:3

@abernix thank’s a lot for your reply, I still ve same error since the last time, I ve tried all but nothing; this is the error on windows and mac http://pastecode.org/index.php/view/17802020,
thanks for your time and help

What are the contents of your .meteor/packages file?

@abernix here is the content of package file http://paste.ofcode.org/v4PS9FBd2ULKiyuRCRNZtH

Thank’s

Looks reasonable. Could you actually just make a basic reproduction repo? Reporting a bug is a good place to find information on what would be expected.

@abernix, do you means that you want to see a repo(code)?

A reproduction available in a Git (repo)sitory which can be easily cloned and consists of a basic, barebones, Meteor project demonstrating this problem – as simply as possible.

@abernix, I ve a repo on bitbucket; can you give me your mail please to send you an invitation?.

Thank’s

Please make a simple reproduction and something that you can post publicly – not an existing private repository. BitBucket is fine, but it should be public and not something with a lot of code or sensitive information.

@abernix I understand you; making a simple reproduction may not help to see from where the problem come, I think.

One suggest me to ‘import’ utils/sortPrefixedStyle as I use the laste version of meteor, what do you think about that?

@nwabdou85 without seeing code it’s hard to assume but i think you have somewhere, in your insert / update / retrieve code, something like this:

Meteor.users.find( { emails.address: 'someadress@somedomain.com' })

or

Meteor.users.update({
...
}, { $set: { emails.address: 'someadress@somedomain.com' }})

which would be wrong as in Mongo you have to quote nested fields. So it should look like this:

Meteor.users.find( { emails.address: 'someadress@somedomain.com' })

You can read about Mongo queries here: https://docs.mongodb.com/manual/tutorial/query-embedded-documents/

Maybe this helps.