[Solved] Get error after upgrade to Meteor1.8 `Cannot read property 'constructor' of undefined...at packages/peerlibrary_subscription-scope.`


#1

Get error after upgrade Meteor 1.8

TypeError: Cannot read property 'constructor' of undefined
W20181203-12:04:08.689(7)? (STDERR)     at packages/peerlibrary_subscription-scope.js:79:32
W20181203-12:04:08.689(7)? (STDERR)     at packages/peerlibrary_subscription-scope.js:119:4
W20181203-12:04:08.689(7)? (STDERR)     at packages/peerlibrary_subscription-scope.js:523:3
W20181203-12:04:08.690(7)? (STDERR)     at /Users/theara/Desktop/MyApp/meteor-element/.meteor/local/build/programs/server/boot.js:411:36
W20181203-12:04:08.691(7)? (STDERR)     at Array.forEach (<anonymous>)
W20181203-12:04:08.691(7)? (STDERR)     at /Users/theara/Desktop/MyApp/meteor-element/.meteor/local/build/programs/server/boot.js:220:19
W20181203-12:04:08.692(7)? (STDERR)     at /Users/theara/Desktop/MyApp/meteor-element/.meteor/local/build/programs/server/boot.js:471:5
W20181203-12:04:08.692(7)? (STDERR)     at Function.run (/Users/theara/Desktop/MyApp/meteor-element/.meteor/local/build/programs/server/profile.js:510:12)
W20181203-12:04:08.692(7)? (STDERR)     at /Users/theara/Desktop/MyApp/meteor-element/.meteor/local/build/programs/server/boot.js:470:clock11

My package

# 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.

meteor-base@1.4.0             # Packages every Meteor app needs to have
mobile-experience@1.0.5       # Packages for a great mobile UX
mongo@1.6.0                   # The database Meteor supports right now
tracker@1.2.0                 # Meteor's client-side reactive programming library

standard-minifier-css@1.5.2   # CSS minifier run for production mode
standard-minifier-js@2.4.0    # JS minifier run for production mode
es5-shim@4.8.0                # ECMAScript 5 compatibility for older browsers
ecmascript@0.12.3              # Enable ECMAScript2015+ syntax in app code
shell-server@0.4.0            # Server-side component of the `meteor shell` command

#--- Core ---
static-html
dynamic-import
ddp-rate-limiter
http
check
accounts-base
accounts-password
session
ejson
less

#--- Community ---
# Collection
aldeed:collection2-core
aldeed:schema-index
aldeed:schema-deny
matb33:collection-hooks
sakulstra:aggregate
cultofcoders:grapher

# Method
mdg:validated-method
didericis:callpromise-mixin

# Roles
alanning:roles
ongoworks:security

# Path & File
ostrio:meteor-root
ostrio:files

# UI
akryum:vue-component
akryum:vue-less
akryum:vue-sass
cultofcoders:persistent-session
nathantreid:static-assets

# Test
cultofcoders:mocha
xolvio:cleaner

# Local
theara:collection-behaviours

#2

Cannot read property β€˜constructor’ of undefined is often caused by an incorrect import line if imported immediately before another package that depends on it.

Can you identify the last change you made before the error appeared?

And can you post the few lines of code from this file packages/peerlibrary_subscription-scope.js:79:32 where the error is being thrown? (line 79 of the file).
That might give us a clue what module is left undefined

Also, which package depends on peerlibrary:subscription-scope, since it’s not in your direct dependencies?
How is it using it?


#3

But it work fine before upgrade


#4

Ahh, sorry I missed that this happened after an upgrade.

Do you still have the list of versions that changed during the upgrade?

Can you respond to these as well?

And can you post the few lines of code from this file packages/peerlibrary_subscription-scope.js:79:32 where the error is being thrown? (line 79 of the file).
That might give us a clue what module is left undefined

Also, which package depends on peerlibrary:subscription-scope, since it’s not in your direct dependencies?
How is it using it?


#5

Version package list

// METEOR@1.7.0.5
accounts-base@1.4.2
accounts-password@1.5.1
akryum:vue-component@0.14.0
akryum:vue-component-dev-client@0.4.2
akryum:vue-component-dev-server@0.1.1
akryum:vue-less@0.1.0
akryum:vue-sass@0.1.0
alanning:roles@1.2.16
aldeed:collection2@3.0.0
aldeed:collection2-core@2.1.2
aldeed:schema-deny@3.0.0
aldeed:schema-index@3.0.0
allow-deny@1.1.0
amplify@1.0.0
autoupdate@1.4.0
babel-compiler@7.1.1
babel-runtime@1.2.7
base64@1.0.11
binary-heap@1.0.10
blaze@2.3.3
blaze-tools@1.0.10
boilerplate-generator@1.5.0
caching-compiler@1.1.12
caching-html-compiler@1.1.3
callback-hook@1.1.0
check@1.3.1
coffeescript@1.0.17
cultofcoders:grapher@1.3.7_4
cultofcoders:mocha@2.4.6
cultofcoders:persistent-session@0.4.5
dburles:mongo-collection-instances@0.3.5
ddp@1.4.0
ddp-client@2.3.2
ddp-common@1.4.0
ddp-rate-limiter@1.0.7
ddp-server@2.2.0
deps@1.0.12
didericis:callpromise-mixin@0.0.1
diff-sequence@1.1.0
dynamic-import@0.4.2
ecmascript@0.11.1
ecmascript-runtime@0.7.0
ecmascript-runtime-client@0.7.2
ecmascript-runtime-server@0.7.1
ejson@1.1.0
email@1.2.3
es5-shim@4.8.0
geojson-utils@1.0.10
herteby:denormalize@0.6.5
hot-code-push@1.0.4
html-tools@1.0.11
htmljs@1.0.11
http@1.4.1
id-map@1.1.0
jquery@1.11.11
lai:collection-extensions@0.2.1_1
launch-screen@1.1.1
less@2.7.12
livedata@1.0.18
localstorage@1.2.0
logging@1.1.20
matb33:collection-hooks@0.8.4
mdg:validated-method@1.1.0
meteor@1.9.2
meteor-base@1.4.0
minifier-css@1.3.1
minifier-js@2.3.5
minimongo@1.4.4
mobile-experience@1.0.5
mobile-status-bar@1.0.14
modern-browsers@0.1.2
modules@0.12.2
modules-runtime@0.10.2
mongo@1.5.1
mongo-dev-server@1.1.0
mongo-id@1.0.7
nathantreid:static-assets@0.0.2
npm-bcrypt@0.9.3
npm-mongo@3.0.11
observe-sequence@1.0.16
ongoworks:security@2.1.0
ordered-dict@1.1.0
ostrio:cookies@2.3.0
ostrio:files@1.10.2
ostrio:meteor-root@1.0.7
practicalmeteor:chai@2.1.0_1
practicalmeteor:loglevel@1.2.0_2
practicalmeteor:mocha-core@1.0.1
practicalmeteor:sinon@1.14.1_2
promise@0.11.1
raix:eventemitter@0.1.3
random@1.1.0
rate-limit@1.0.9
reactive-dict@1.2.1
reactive-var@1.0.11
reload@1.2.0
retry@1.1.0
reywood:publish-composite@1.7.0
routepolicy@1.0.13
sakulstra:aggregate@1.4.3
service-configuration@1.0.11
session@1.1.8
sha@1.0.9
shell-server@0.3.1
socket-stream-client@0.2.2
spacebars@1.0.15
spacebars-compiler@1.1.3
srp@1.0.12
standard-minifier-css@1.4.1
standard-minifier-js@2.3.4
static-html@1.2.2
templating@1.3.2
templating-compiler@1.3.3
templating-runtime@1.3.2
templating-tools@1.1.2
theara:collection-behaviours@0.0.5
tmeasday:check-npm-versions@0.3.2
tmeasday:test-reporter-helpers@0.2.1
tracker@1.2.0
underscore@1.0.10
url@1.2.0
webapp@1.6.1
webapp-hashing@1.0.9
xolvio:cleaner@0.3.3
//METEOR@1.8.0.1
accounts-base@1.4.3
accounts-password@1.5.1
akryum:vue-component@0.14.2
akryum:vue-component-dev-client@0.4.4
akryum:vue-component-dev-server@0.1.3
akryum:vue-less@0.1.1
akryum:vue-sass@0.1.1
alanning:roles@1.2.16
aldeed:collection2@3.0.1
aldeed:collection2-core@2.1.2
aldeed:schema-deny@3.0.0
aldeed:schema-index@3.0.0
allow-deny@1.1.0
amplify@1.0.0
autoupdate@1.5.0
babel-compiler@7.2.3
babel-runtime@1.3.0
base64@1.0.11
binary-heap@1.0.11
blaze@2.3.3
blaze-tools@1.0.10
boilerplate-generator@1.6.0
caching-compiler@1.2.1
caching-html-compiler@1.1.3
callback-hook@1.1.0
check@1.3.1
coffeescript@1.0.17
cultofcoders:grapher@1.3.9_1
cultofcoders:mocha@2.4.6
cultofcoders:persistent-session@0.4.5
dburles:mongo-collection-instances@0.3.5
ddp@1.4.0
ddp-client@2.3.3
ddp-common@1.4.0
ddp-rate-limiter@1.0.7
ddp-server@2.2.0
deps@1.0.12
didericis:callpromise-mixin@0.0.1
diff-sequence@1.1.1
dynamic-import@0.5.1
ecmascript@0.12.3
ecmascript-runtime@0.7.0
ecmascript-runtime-client@0.8.0
ecmascript-runtime-server@0.7.1
ejson@1.1.0
email@1.2.3
es5-shim@4.8.0
fetch@0.1.0
geojson-utils@1.0.10
herteby:denormalize@0.6.5
hot-code-push@1.0.4
html-tools@1.0.11
htmljs@1.0.11
http@1.4.2
id-map@1.1.0
inter-process-messaging@0.1.0
jquery@1.11.11
lai:collection-extensions@0.2.1_1
launch-screen@1.1.1
less@2.8.0
livedata@1.0.18
localstorage@1.2.0
logging@1.1.20
matb33:collection-hooks@0.8.4
mdg:validated-method@1.2.0
meteor@1.9.2
meteor-base@1.4.0
minifier-css@1.4.1
minifier-js@2.4.0
minimongo@1.4.5
mobile-experience@1.0.5
mobile-status-bar@1.0.14
modern-browsers@0.1.3
modules@0.13.0
modules-runtime@0.10.3
mongo@1.6.0
mongo-decimal@0.1.0
mongo-dev-server@1.1.0
mongo-id@1.0.7
nathantreid:static-assets@0.1.0
npm-bcrypt@0.9.3
npm-mongo@3.1.1
observe-sequence@1.0.16
ongoworks:security@2.1.0
ordered-dict@1.1.0
ostrio:cookies@2.3.0
ostrio:files@1.10.2
ostrio:meteor-root@1.0.7
peerlibrary:subscription-scope@0.1.0
practicalmeteor:chai@2.1.0_1
practicalmeteor:loglevel@1.2.0_2
practicalmeteor:mocha-core@1.0.1
practicalmeteor:sinon@1.14.1_2
promise@0.11.1
raix:eventemitter@0.1.3
random@1.1.0
rate-limit@1.0.9
reactive-dict@1.2.1
reactive-var@1.0.11
reload@1.2.0
retry@1.1.0
reywood:publish-composite@1.5.2
routepolicy@1.1.0
sakulstra:aggregate@1.4.3
service-configuration@1.0.11
session@1.2.0
sha@1.0.9
shell-server@0.4.0
socket-stream-client@0.2.2
spacebars@1.0.15
spacebars-compiler@1.1.3
srp@1.0.12
standard-minifier-css@1.5.2
standard-minifier-js@2.4.0
static-html@1.2.2
templating@1.2.15
templating-compiler@1.2.15
templating-runtime@1.2.15
templating-tools@1.1.2
tmeasday:check-npm-versions@0.3.2
tmeasday:test-reporter-helpers@0.2.1
tracker@1.2.0
underscore@1.0.10
url@1.2.0
webapp@1.7.2
webapp-hashing@1.0.9
xolvio:cleaner@0.3.3

I don’t know which package depend on peerlibrary:subscription-scope???


#6

use meteor list --tree to view the whole dependency tree, that will help you find which package depends on it


#7

Now I found in cultofcoders:grapher

cultofcoders:grapher@1.3.9_3
β”œβ”€β”€ check@1.3.1 (top level)
β”œβ”€β”¬ dburles:mongo-collection-instances@0.3.5
β”‚ β”œβ”€β”¬ lai:collection-extensions@0.2.1_1
β”‚ β”‚ β”œβ”€β”€ minimongo@1.4.5 (expanded above)
β”‚ β”‚ β”œβ”€β”€ mongo@1.6.0 (top level)
β”‚ β”‚ └── tracker@1.2.0 (top level)
β”‚ β”œβ”€β”€ mongo@1.6.0 (top level)
β”‚ └── underscore@1.0.10
β”œβ”€β”€ ecmascript@0.12.3 (top level)
β”œβ”€β”¬ herteby:denormalize@0.6.5
β”‚ β”œβ”€β”€ check@1.3.1 (top level)
β”‚ β”œβ”€β”€ ecmascript@0.12.3 (top level)
β”‚ β”œβ”€β”€ matb33:collection-hooks@0.8.4 (top level)
β”‚ └── mongo@1.6.0 (top level)
β”œβ”€β”€ matb33:collection-hooks@0.8.4 (top level)
β”œβ”€β”€ mongo@1.6.0 (top level)
β”œβ”€β”¬ peerlibrary:subscription-scope@0.4.0
β”‚ β”œβ”€β”¬ coffeescript@2.3.2_1
β”‚ β”‚ β”œβ”€β”¬ babel-runtime@1.3.0
β”‚ β”‚ β”‚ └── modules@0.13.0 (expanded above)
β”‚ β”‚ β”œβ”€β”€ caching-compiler@1.2.1 (expanded above)
β”‚ β”‚ β”œβ”€β”¬ coffeescript-compiler@2.3.2_1
β”‚ β”‚ β”‚ β”œβ”€β”€ babel-compiler@7.2.3 (expanded above)
β”‚ β”‚ β”‚ └── ecmascript@0.12.3 (top level)
β”‚ β”‚ β”œβ”€β”€ dynamic-import@0.5.1 (top level)
β”‚ β”‚ β”œβ”€β”€ ecmascript@0.12.3 (top level)
β”‚ β”‚ β”œβ”€β”€ ecmascript-runtime@0.7.0 (expanded above)
β”‚ β”‚ └── promise@0.11.1 (expanded above)
β”‚ β”œβ”€β”€ ecmascript@0.12.3 (top level)
β”‚ β”œβ”€β”€ minimongo@1.4.5 (expanded above)

#8

Is there another? your .versions file says you have 0.1.0, when grapher wants 0.4.0?


#9

Now it work fine, when reinstall cultofcoders:grapher