[Solved][1.4.2.7] Help! Meteor can't resolve its own packages

Hi,

Meteor doesn’t work anymore. It fails to resolve its own packages in the browser.

I had to downgrade from 1.4.3.1 after troubles with ecmascript@0.6.3 to 1.4.2.7 and ecmascript@=0.6.1 but now I get just errors in the browser when I started my meteor application. It is always an issue with meteor packages which can’t be resolved.

I tried:

  • meteor reset
  • meteor npm cache clean
  • delete node_modules and reinstalled everything
  • removed .meteor/local

Nothing worked. Does anybody have an idea?

Here are the error logs from the browser console:

Uncaught SyntaxError: Unexpected token import
es5-shim.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at es5-shim.js:17
    at es5-shim.js:2789
promise.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at promise.js:17
    at promise.js:581
ecmascript-runtime.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at ecmascript-runtime.js:17
    at ecmascript-runtime.js:4630
babel-runtime.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at babel-runtime.js:17
    at babel-runtime.js:160
random.js:18 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at random.js:18
    at random.js:355
mongo-id.js:19 Uncaught TypeError: Cannot read property 'Random' of undefined
    at mongo-id.js:19
    at mongo-id.js:142
geojson-utils.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at geojson-utils.js:17
    at geojson-utils.js:439
minimongo.js:23 Uncaught TypeError: Cannot read property 'MongoID' of undefined
    at minimongo.js:23
    at minimongo.js:3917
check.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at check.js:17
    at check.js:583
retry.js:18 Uncaught TypeError: Cannot read property 'Random' of undefined
    at retry.js:18
    at retry.js:110
ddp-common.js:17 Uncaught TypeError: Cannot read property 'check' of undefined
    at ddp-common.js:17
    at ddp-common.js:493
reload.js:18 Uncaught TypeError: Cannot read property 'Symbol' of undefined
    at reload.js:18
    at reload.js:309
ddp-client.js:17 Uncaught TypeError: Cannot read property 'check' of undefined
    at ddp-client.js:17
    at ddp-client.js:4985
ddp.js:14 Uncaught TypeError: Cannot read property 'DDP' of undefined
    at ddp.js:14
    at ddp.js:27
allow-deny.js:18 Uncaught TypeError: Cannot read property 'LocalCollection' of undefined
    at allow-deny.js:18
    at allow-deny.js:536
mongo.js:17 Uncaught TypeError: Cannot read property 'AllowDeny' of undefined
    at mongo.js:17
    at mongo.js:909
localstorage.js:17 Uncaught TypeError: Cannot read property 'Random' of undefined
    at localstorage.js:17
    at localstorage.js:93
accounts-base.js:20 Uncaught TypeError: Cannot read property 'Random' of undefined
    at accounts-base.js:20
    at accounts-base.js:1285
srp.js:17 Uncaught TypeError: Cannot read property 'Random' of undefined
    at srp.js:17
    at srp.js:1445
accounts-password.js:17 Uncaught TypeError: Cannot read property 'Accounts' of undefined
    at accounts-password.js:17
    at accounts-password.js:321
aldeed_simple-schema.js:20 Uncaught TypeError: Cannot read property 'check' of undefined
    at aldeed_simple-schema.js:20
    at aldeed_simple-schema.js:3142
aldeed_collection2-core.js:17 Uncaught TypeError: Cannot read property 'SimpleSchema' of undefined
    at aldeed_collection2-core.js:17
    at aldeed_collection2-core.js:721
aldeed_schema-index.js:17 Uncaught TypeError: Cannot read property 'Collection2' of undefined
    at aldeed_schema-index.js:17
    at aldeed_schema-index.js:130
aldeed_schema-deny.js:17 Uncaught TypeError: Cannot read property 'Collection2' of undefined
    at aldeed_schema-deny.js:17
    at aldeed_schema-deny.js:76
jquery.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at jquery.js:17
    at jquery.js:10421
meteorhacks_kadira.js:18 Uncaught TypeError: Cannot read property 'Random' of undefined
    at meteorhacks_kadira.js:18
    at meteorhacks_kadira.js:1084
http.js:19 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at http.js:19
    at http.js:345
meteorhacks_kadira-profiler.js:17 Uncaught TypeError: Cannot read property 'HTTP' of undefined
    at meteorhacks_kadira-profiler.js:17
    at meteorhacks_kadira-profiler.js:51
reactive-dict.js:21 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at reactive-dict.js:21
    at reactive-dict.js:375
session.js:18 Uncaught TypeError: Cannot read property 'ReactiveDict' of undefined
    at session.js:18
    at session.js:98
kadira_debug.js:18 Uncaught TypeError: Cannot read property 'Random' of undefined
    at kadira_debug.js:18
    at kadira_debug.js:922
webapp.js:18 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at webapp.js:18
    at webapp.js:70
livedata.js:14 Uncaught TypeError: Cannot read property 'DDP' of undefined
    at livedata.js:14
    at livedata.js:31
autoupdate.js:19 Uncaught TypeError: Cannot read property 'Retry' of undefined
    at autoupdate.js:19
    at autoupdate.js:206
global-imports.js:3 Uncaught TypeError: Cannot read property 'Mongo' of undefined
    at global-imports.js:3
app.js:1 Uncaught ReferenceError: meteorInstall is not defined
    at app.js:1
service-configuration.js:17 Uncaught TypeError: Cannot read property 'Accounts' of undefined
    at service-configuration.js:17
    at service-configuration.js:77
mdg_validation-error.js:17 Uncaught TypeError: Cannot read property 'SimpleSchema' of undefined
    at mdg_validation-error.js:17
    at mdg_validation-error.js:93

Okay, I’ve figured out it was/is an issue with apollo-client@0.10.0. After downgrading it to my latest version it worked.

Hi,

I encouter the same problem as you and i don’t know how you do to figure it out ? what gives you the idea that it was appollo-client the problem ? i havn’t got this package in my application and I don’t know where is my problem.

Maybe you can help me, here are my errors :

Thank’s for reading my demand.
Best regards

Hey man,

it is basically the issue I’ve had later again and you find the reason and solution here:

The error was produced because I imported something from apollo-client from its subdirectory like so (and in your case maybe you do it with some other lib):

import blablabla from 'apollo-client/lib/blablabla';

The issue was produced, because apollo-client changed its module structure or something like that so I could not import from apollo-clients’ subdirectory any more.

Thank’s for your quick answer,

I checked my code to find some import similar to yours, i change the code to avoid the problem (even if I don’t know if it was the problem).

I still have the error, i wonder if a import package can have this syntax in its imports that can create the bug.

I notice that there is this error:

SCRIPT1002: Syntax Error
ostrio_files.js

The arrow function is causing syntax error, have you ever encouter this error ?

Thank you.

Hey donjgo,

maybe. The best thing is to figure out what you have changed since the last time when it still worked. Maybe you’ve update or installed some libs, created new files, etc.

In my case it was a import statement within apollo-client which breaks meteor … To say it short: It was ES6 code which wasn’t compiled by the meteor build system as I violated the proper way in ‘apollo-client’ to import the stuff. So, for some reasons – I don’t know exactly why – the result was that the meteor build tool couldn’t build the files and transform the code from ES6 to ES5. That’s why the error function causes the error – it simply wasn’t transformed.

I can’t say where exactly the reason lies in your case, I could just mention my old case. :slight_smile:

Maybe it is caused through the package ostrio – have you installed it? Have you tested what happens, if you won’t use it – is the error still there then?

Thank’s for your answer,

The things is that my app has never worked on IE so I cannot compare to an older version (the oldest version i got does not work on IE11).

The things i don’t understand is that when I create a new app with meteor command line, the app has ostrio_files in its packages and it works well on IE so i’m trying to see what is going bad with my app version.

I always see that the files are different, i my current app ostrio_files.js use arrow function but in the new empty app, it does not have arrow functions.

I keep searching and will post the solution if i can find it ^^