Meteor 1.5.2 crash during startup on Windows 8.1


#1

I am getting the following failure when I try to start meteor 1.5.2 on Windows 8.1. I tried doing “meteor npm install” in case something isn’t getting installed, but that hasn’t helped. See below for what happens when I try to do “meteor npm install meteor/browser-policy-common”.

W20170917-09:25:18.379(-7)? (STDERR) C:\Users\mhl\AppData\Local\.meteor\packages\meteor-tool\1.5.2\mt-os.window
s.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:280
W20170917-09:25:18.526(-7)? (STDERR)                                            throw(ex);
W20170917-09:25:18.528(-7)? (STDERR)                                            ^
W20170917-09:25:18.530(-7)? (STDERR)
W20170917-09:25:18.532(-7)? (STDERR) Error: Can't find npm module 'meteor/browser-policy-common'. Did you forge
t to call 'Npm.depends' in package.js within the 'modules-runtime' package?
W20170917-09:25:18.536(-7)? (STDERR)     at Object.require (C:\Users\mhl\Google Drive\Quarule\QRBuilder_Applica
tion\.meteor\local\build\programs\server\boot.js:230:17)
W20170917-09:25:18.540(-7)? (STDERR)     at makeInstallerOptions.fallback (packages\modules-runtime.js:641:18)
W20170917-09:25:18.541(-7)? (STDERR)     at require (packages\modules-runtime.js:234:16)
W20170917-09:25:18.543(-7)? (STDERR)     at meteorInstall.imports.startup.server.security.js (imports/startup/s
erver/security.js:1:32)
W20170917-09:25:18.545(-7)? (STDERR)     at fileEvaluate (packages\modules-runtime.js:333:9)
W20170917-09:25:18.546(-7)? (STDERR)     at require (packages\modules-runtime.js:228:16)
W20170917-09:25:18.547(-7)? (STDERR)     at meteorInstall.imports.startup.server.index.js (imports/startup/serv
er/index.js:1:14)
W20170917-09:25:18.553(-7)? (STDERR)     at fileEvaluate (packages\modules-runtime.js:333:9)
W20170917-09:25:18.555(-7)? (STDERR)     at require (packages\modules-runtime.js:228:16)
W20170917-09:25:18.557(-7)? (STDERR)     at meteorInstall.server.main.js (server/main.js:1:14)
=> Exited with code: 1

I tried to fix this via “meteor npm install meteor/browser-policy-common” and got this:

 meteor npm install meteor/browser-policy-common
npm ERR! git clone --template=C:\Users\mhl\AppData\Local\.meteor\packages\meteor-tool\1.5.2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\_templates --mirror git@github.com:meteor/browser-policy-common.git C:\Users\mhl\AppData\Local\.meteor\packages\meteor-tool\1.5.2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-meteor-browser-policy-common-git-96c00e64: Cloning into bare repository 'C:\Users\mhl\AppData\Local\.meteor\packages\meteor-tool\1.5.2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-meteor-browser-policy-common-git-96c00e64'...
npm ERR! git clone --template=C:\Users\mhl\AppData\Local\.meteor\packages\meteor-tool\1.5.2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\_templates --mirror git@github.com:meteor/browser-policy-common.git C:\Users\mhl\AppData\Local\.meteor\packages\meteor-tool\1.5.2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-meteor-browser-policy-common-git-96c00e64: Host key verification failed.
npm ERR! git clone --template=C:\Users\mhl\AppData\Local\.meteor\packages\meteor-tool\1.5.2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\_templates --mirror git@github.com:meteor/browser-policy-common.git C:\Users\mhl\AppData\Local\.meteor\packages\meteor-tool\1.5.2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-meteor-browser-policy-common-git-96c00e64: fatal: Could not read from remote repository.
npm ERR! git clone --template=C:\Users\mhl\AppData\Local\.meteor\packages\meteor-tool\1.5.2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\_templates --mirror git@github.com:meteor/browser-policy-common.git C:\Users\mhl\AppData\Local\.meteor\packages\meteor-tool\1.5.2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-meteor-browser-policy-common-git-96c00e64:
npm ERR! git clone --template=C:\Users\mhl\AppData\Local\.meteor\packages\meteor-tool\1.5.2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\_templates --mirror git@github.com:meteor/browser-policy-common.git C:\Users\mhl\AppData\Local\.meteor\packages\meteor-tool\1.5.2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-meteor-browser-policy-common-git-96c00e64: Please make sure you have the correct access rights
npm ERR! git clone --template=C:\Users\mhl\AppData\Local\.meteor\packages\meteor-tool\1.5.2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\_templates --mirror git@github.com:meteor/browser-policy-common.git C:\Users\mhl\AppData\Local\.meteor\packages\meteor-tool\1.5.2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-meteor-browser-policy-common-git-96c00e64: and the repository exists.
npm ERR! code 128
npm ERR! Command failed: git -c core.longpaths=true clone --template=C:\Users\mhl\AppData\Local\.meteor\packages\meteor-tool\1.5.2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\_templates --mirror git@github.com:meteor/browser-policy-common.git C:\Users\mhl\AppData\Local\.meteor\packages\meteor-tool\1.5.2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-meteor-browser-policy-common-git-96c00e64
npm ERR! Cloning into bare repository 'C:\Users\mhl\AppData\Local\.meteor\packages\meteor-tool\1.5.2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-meteor-browser-policy-common-git-96c00e64'...
npm ERR! Host key verification failed.
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\mhl\AppData\Local\.meteor\packages\meteor-tool\1.5.2\mt-os.windows.x86_32\dev_bundle\.npm\_logs\2017-09-17T16_33_34_835Z-debug.log

#2

I fixed the immediate problem by doing “meteor add browser-policy-common”. I’ve never had to do that before; what changed?

Now I’ve got this error:

W20170917-09:48:57.977(-7)? (STDERR) C:\Users\mhl\AppData\Local\.meteor\packages\meteor-tool\1.5.2\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:280
W20170917-09:48:58.056(-7)? (STDERR)                                            throw(ex);
W20170917-09:48:58.058(-7)? (STDERR)                                            ^
W20170917-09:48:58.061(-7)? (STDERR)
W20170917-09:48:58.063(-7)? (STDERR) TypeError: Cannot read property 'allowOriginForAll' of undefined
W20170917-09:48:58.065(-7)? (STDERR)     at meteorInstall.imports.startup.server.security.js (imports/startup/server/security.js:3:1)
W20170917-09:48:58.067(-7)? (STDERR)     at fileEvaluate (packages\modules-runtime.js:333:9)
W20170917-09:48:58.069(-7)? (STDERR)     at require (packages\modules-runtime.js:228:16)
W20170917-09:48:58.071(-7)? (STDERR)     at meteorInstall.imports.startup.server.index.js (imports/startup/server/index.js:1:14)
W20170917-09:48:58.072(-7)? (STDERR)     at fileEvaluate (packages\modules-runtime.js:333:9)
W20170917-09:48:58.074(-7)? (STDERR)     at require (packages\modules-runtime.js:228:16)
W20170917-09:48:58.076(-7)? (STDERR)     at meteorInstall.server.main.js (server/main.js:1:14)
W20170917-09:48:58.080(-7)? (STDERR)     at fileEvaluate (packages\modules-runtime.js:333:9)
W20170917-09:48:58.082(-7)? (STDERR)     at require (packages\modules-runtime.js:228:16)
W20170917-09:48:58.084(-7)? (STDERR)     at C:\Users\mhl\Google Drive\Quarule\QRBuilder_Application\.meteor\local\build\programs\server\app\app.js:761:1

#3

My security.js code reads as follows:

import { BrowserPolicy } from 'meteor/browser-policy-common';

BrowserPolicy.content.allowOriginForAll('*.googleapis.com');
BrowserPolicy.content.allowOriginForAll('*.gstatic.com');
BrowserPolicy.content.allowOriginForAll('*.bootstrapcdn.com');

BrowserPolicy.content.allowFontDataUrl();

I tried changing the import statement to:

import { BrowserPolicy } from 'meteor/browser-policy';

but that didn’t help and in fact eslint says it cannot resolve the path for that.


#4

Turns out that all the old-style Atmosphere packages that I use were dropped from my application for some reason. Once I got them all re-added, everything seems to work. Problem solved, at the cost of a couple of hours of my Sunday time.