Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[osx] Cannot find module crypto while loading isopacket ddp when updating to 1.5.2.1 #9136

Closed
juho opened this issue Sep 26, 2017 · 17 comments
Closed
Labels

Comments

@juho
Copy link
Contributor

juho commented Sep 26, 2017

On Meteor 1.5.2 updating to 1.5.2.1 on MacOS 10.12.6

$ meteor update
Errors prevented isopacket load:

While loading isopacket `ddp`:
module.js:325:15: Cannot find module '/Users/jh/dev/project/app/node_modules/crypto'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.require (/tools/isobuild/bundler.js:1900:22)
at meteorInstall.node_modules.meteor.random.random.js (packages/random/random.js:11:24)
at fileEvaluate (packages/modules-runtime.js:333:9)
at require (packages/modules-runtime.js:228:16)
at <runJavaScript-3>:350:1
at <runJavaScript-3>:362:3


/Users/jh/.meteor/packages/meteor-tool/.1.5.2_1.19j8xtt++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:218
      throw error;
      ^

Error: isopacket load failed?
    at loadIsopacketFromDisk (/tools/tool-env/isopackets.js:299:11)
    at /tools/tool-env/isopackets.js:96:23
    at Object.exports.noYieldsAllowed (/tools/utils/fiber-helpers.js:37:14)
    at Object.load (/tools/tool-env/isopackets.js:88:23)
    at new ServiceConnection (/tools/meteor-services/service-connection.js:29:28)
    at Object.exports.openServiceConnection (/tools/meteor-services/auth-client.js:12:10)
    at openPackageServerConnection (/tools/packaging/package-client.js:23:21)
    at _updateServerPackageData (/tools/packaging/package-client.js:151:14)
    at /tools/packaging/package-client.js:129:12
    at /tools/utils/buildmessage.js:334:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:333:36
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.enterJob (/tools/utils/buildmessage.js:324:26)
    at Object.exports.updateServerPackageData (/tools/packaging/package-client.js:128:23)
    at /tools/packaging/catalog/catalog-remote.js:777:36
    at /tools/utils/buildmessage.js:334:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:333:36
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.enterJob (/tools/utils/buildmessage.js:324:26)
    at [object Object]._.extend.refresh (/tools/packaging/catalog/catalog-remote.js:776:18)
    at Object.catalog.refreshOrWarn (/tools/packaging/catalog/catalog.js:48:22)
    at [object Object].catalog.Refresh.OnceAtStart.beforeCommand (/tools/packaging/catalog/catalog.js:21:16)
    at /tools/cli/main.js:1479:32
    at /tools/utils/buildmessage.js:334:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:333:36
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.enterJob (/tools/utils/buildmessage.js:324:26)
    at /tools/cli/main.js:1478:20

.meteor/versions:

accounts-base@1.3.2
accounts-password@1.4.0
acemtp:algolia@3.9.1
alanning:roles@1.2.16
aldeed:collection2@2.10.0
aldeed:collection2-core@1.2.0
aldeed:schema-deny@1.1.0
aldeed:schema-index@1.1.1
aldeed:simple-schema@1.5.3
aldeed:template-extension@4.1.0
allow-deny@1.0.6
amplify@1.0.0
autoupdate@1.3.12
babel-compiler@6.20.0
babel-runtime@1.0.1
base64@1.0.10
binary-heap@1.0.10
blaze@2.3.2
blaze-html-templates@1.1.2
blaze-tools@1.0.10
boilerplate-generator@1.2.0
caching-compiler@1.1.9
caching-html-compiler@1.1.2
callback-hook@1.0.10
cfs:http-methods@0.0.32
check@1.2.5
chuangbo:cookie@1.1.0
coffeescript@1.12.7_1
coffeescript-compiler@1.12.7_1
copleykj:shower@0.1.16
cscottnet:es5-shim@4.4.1
cultofcoders:grapher@1.2.8_1
dburles:mongo-collection-instances@0.3.5
ddp@1.3.0
ddp-client@2.1.0
ddp-common@1.2.9
ddp-rate-limiter@1.0.7
ddp-server@2.0.0
deps@1.0.12
diff-sequence@1.0.7
dynamic-import@0.1.1
ecmascript@0.8.2
ecmascript-runtime@0.4.1
ecmascript-runtime-client@0.4.3
ecmascript-runtime-server@0.4.1
ejson@1.0.14
em0ney:jstz@1.0.5_1
email@1.2.3
es5-shim@4.6.15
fastclick@1.0.13
fongandrew:find-and-modify@1.0.0
gadicohen:headers@0.0.31
geojson-utils@1.0.10
hot-code-push@1.0.4
html-tools@1.0.11
htmljs@1.0.11
http@1.2.12
id-map@1.0.9
iron:controller@1.0.12
iron:core@1.0.11
iron:dynamic-template@1.0.12
iron:layout@1.0.12
iron:location@1.0.11
iron:middleware-stack@1.1.0
iron:router@1.1.2
iron:url@1.1.0
jquery@1.11.10
lai:collection-extensions@0.2.1_1
less@2.7.9
livedata@1.0.18
localstorage@1.1.1
logging@1.1.17
manuel:isdev@1.0.0
manuel:reactivearray@1.0.6
manuel:viewmodel@6.3.3
manuel:viewmodel-debug@2.7.1
matb33:collection-hooks@0.8.4
mdg:validated-method@1.1.0
mdg:validation-error@0.5.1
meteor@1.7.1
meteor-base@1.1.0
meteorhacks:aggregate@1.3.0
meteorhacks:async@1.0.0
meteorhacks:collection-utils@1.2.0
meteorhacks:inject-initial@1.0.4
meteorhacks:meteorx@1.4.1
meteorhacks:npm@1.5.0
meteorhacks:ssr@2.2.0
meteorhacks:subs-manager@1.6.4
meteorhacks:unblock@1.1.0
meteorspark:util@0.2.0
minifier-css@1.2.16
minifier-js@2.1.3
minifiers@1.1.8-faster-rebuild.0
minimongo@1.3.0
mizzao:timesync@0.5.0
mizzao:user-status@0.6.7
modules@0.10.0
modules-runtime@0.8.0
momentjs:moment@2.18.1
mongo@1.2.0
mongo-dev-server@1.0.1
mongo-id@1.0.6
mongo-livedata@1.0.12
mrt:jquery-ui-sortable@1.10.3
mrt:underscore-string-latest@2.3.3
nc:allocate@0.0.1
npm-bcrypt@0.9.3
npm-container@1.2.0
npm-mongo@2.2.30
nspangler:autoreconnect@0.0.1
observe-sequence@1.0.16
ongoworks:speakingurl@9.0.0
ordered-dict@1.0.9
pacreach:jade@0.5.5
pacreach:jade-compiler@0.5.5
percolate:synced-cron@1.3.2
promise@0.9.0
raix:eventemitter@0.1.3
random@1.0.10
rate-limit@1.0.8
reactive-dict@1.1.9
reactive-var@1.0.11
reload@1.1.11
retry@1.0.9
reywood:publish-composite@1.4.2
richsilv:pikaday@1.0.1
risul:moment-timezone@0.5.7
routepolicy@1.0.12
ryanswapp:spectrum-colorpicker@0.0.1
rzymek:moment-locale-ja@2.14.1
service-configuration@1.0.11
session@1.1.7
sha@1.0.9
shell-server@0.2.4
spacebars@1.0.15
spacebars-compiler@1.1.3
srp@1.0.10
standard-minifier-css@1.3.4
standard-minifier-js@2.1.1
steeve:jquery-qrcode@0.2.2
tap:i18n@1.8.2
templating@1.3.2
templating-compiler@1.3.2
templating-runtime@1.3.2
templating-tools@1.1.2
tmeasday:check-npm-versions@0.3.1
tracker@1.1.3
u2622:persistent-session@0.4.4
ui@1.0.13
underscore@1.0.10
url@1.1.0
webapp@1.3.18
webapp-hashing@1.0.9

package.json:

{
  "name": "project",
  "version": "1.0.0",
  "description": "",
  "dependencies": {
    "aws-cloudfront-sign": "^2.2.0",
    "babel-runtime": "^6.18.0",
    "bcrypt": "^0.8.7",
    "browser-info": "^1.1.1",
    "color-hash": "^1.0.3",
    "csv-parse": "^1.1.7",
    "elasticsearch": "^13.3.1",
    "fibers": "^2.0.0",
    "fingerprintjs2": "^1.5.1",
    "google-auth-library": "^0.10.0",
    "googleapis": "^20.1.0",
    "jquery": "^2.2.3",
    "knox": "^0.9.2",
    "meteor-node-stubs": "^0.2.11",
    "moment": "^2.18.1",
    "moment-timezone": "^0.5.13",
    "nexmo": "^2.0.2",
    "node-outlook": "^1.1.6",
    "notp": "^2.0.3",
    "object-hash": "^1.1.8",
    "punycode": "^2.0.1",
    "sift": "^5.0.0",
    "simple-oauth2": "0.7.0",
    "thirty-two": "^1.0.2",
    "twilio": "2.11.0",
    "uuid": "^3.1.0",
    "winston": "^2.3.1",
    "winston-papertrail": "^1.0.5"
  },
  "devDependencies": {},
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC"
}
@juho juho changed the title Cannot find module crypto while loading isopacket ddp when updating to 1.5.2.1 [osx] Cannot find module crypto while loading isopacket ddp when updating to 1.5.2.1 Sep 26, 2017
@benjamn
Copy link
Contributor

benjamn commented Sep 26, 2017

Is there a directory called /Users/jh/dev/project/app/node_modules/crypto in your app?

@juho
Copy link
Contributor Author

juho commented Sep 26, 2017

Nope, tried removing node_modules and re-running meteor npm install as well as removing .meteor/local and ~/.meteor/

@chendong0120
Copy link

I have the same problem.

@vsheyanov
Copy link

vsheyanov commented Sep 27, 2017

Almost the same problem, MacOS
I have 2 projects

  1. doesn't have node_modules/crypto folder - updated properly to 1.5.2.1
  2. does have node_modules/crypto folder - throws error like in first message above

Error says:
module.js:325:15: Cannot find module '/Users/vs/code/app/int/node_modules/crypto'
But I do have this folder and I can cd into it

@abernix
Copy link
Contributor

abernix commented Sep 27, 2017

This could be due to the same root cause of #9139, though the solution might be a bit more complicated. Once I fix that, we'll see if it fixes this problem as well.

@elisei-timofte
Copy link

Same problem here. Waiting for any news. Thanks!

@benjamn benjamn added this to the 1.5.2.2 milestone Sep 27, 2017
@benjamn
Copy link
Contributor

benjamn commented Sep 27, 2017

I believe this commit should fix the problem: 95dbcf2

We'll have a 1.5.2.2 release candidate out as soon as possible. Thanks for your patience. Remember that you can patch the security vulnerability that motivated 1.5.2.1 by simply running meteor update allow-deny, if you need to stay on 1.5.2 for now.

@elisei-timofte
Copy link

Thanks! I'm waiting for the release.

@juho
Copy link
Contributor Author

juho commented Sep 27, 2017

NB managed to get update through with @benjamn's instructions for windows from the previous isobuild issue #7221

@abernix
Copy link
Contributor

abernix commented Sep 28, 2017

A release candidate for Meteor 1.5.2.2 has been released which includes this change. Please help test it and confirm whether this issue is fixed!

meteor update --release 1.5.2.2-rc.0

@abernix
Copy link
Contributor

abernix commented Sep 29, 2017

Moved from #9140 where @vblagomir wrote:

Solved my Cannot find module '<built-in>' issues. Thank you very much for such a quick release!

@vsheyanov
Copy link

  1. First meteor update --release 1.5.2.2-rc.0 failed with the same error
  2. meteor reset
  3. update again, profit
    Not sure if 2) helped, but looks like fix works, thanks!

@benjamn
Copy link
Contributor

benjamn commented Sep 29, 2017

This should be fixed if you update to Meteor 1.5.2.2 (meteor update --release 1.5.2.2). As @vsheyanov noted, a meteor reset may also help (though bear in mind that will delete your development Mongo database). Thanks everyone!

@benjamn benjamn closed this as completed Sep 29, 2017
@wiserweb
Copy link

wiserweb commented Oct 2, 2017

@benjamn Meteor was showing latest release available was 1.5.2.1 as of Oct 2, 2017 12:27 EST. Not sure if this was intended but reporting here.

Running meteor update on some apps would not display current version and simply got to

Errors prevented isopacket load:              
                                              
While loading isopacket `ddp`:
....

Deleting node_modules would give false positive that meteor is using latest. Only by finding this issue thread and apply 1.5.2.2. makes fixes error.

meteor update
This project is already at Meteor 1.5.2.1, the latest release.

It's not clear that users with 1.5.2.1 will be able to update their meteor version to 1.5.2.2 without manually issuing the meteor update --release 1.5.2.2 command for each affected app unless they know to delete node_modules beforehand.

@hwillson
Copy link
Contributor

hwillson commented Oct 2, 2017

@wiserweb This is intentional (at least for a bit longer). Meteor 1.5.2.2 hasn't been marked as "recommended" yet (we just want to make sure it's working for people first). When it's marked as "recommended", it will show as the most recent official version when you run meteor show METEOR.

@wiserweb
Copy link

wiserweb commented Oct 2, 2017

Ok, much appreciate the clarification on the "recommended" release. It remains that when 1.5.2.2 is ready developers should be instructed to delete node_modules and then issue meteor update command otherwise the error message below will persist without any indication that a new release is available in the "recommended" channel.

Errors prevented isopacket load:              
                                              
While loading isopacket `ddp`:
....

@chendong0120
Copy link

I try

  1. meteor reset
  2. rm -rf node_modules
  3. Del the bcrypt in 'package.json'
  4. meteor update is work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants