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

error: Could not complete server initialisation [v2.0.0-rc.4] #30

Closed
ManuelDeLeon opened this issue Jun 12, 2017 · 34 comments
Closed

error: Could not complete server initialisation [v2.0.0-rc.4] #30

ManuelDeLeon opened this issue Jun 12, 2017 · 34 comments
Labels

Comments

@ManuelDeLeon
Copy link

Using 2.0.0-rc.4 (rc.3 also fails)

If it's any help, I updated to Meteor 1.5 and meteor-azure 2.0.0-rc.4, tried to deploy and got this error. Rolled back to 1.4 and rc.3 and I'm still getting the error.

info:    Authenticating with interactive login...
info:    Updating Azure application settings
info:    Compiling application bundle
info:    Deploying bundle tarball
info:    Running server initialisation, polling for status...
error:   Could not complete server initialisation
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ViewModel.org@ just-deploy: `meteor-azure --settings settings.json --web-config .\.config\azure\web.config`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ViewModel.org@ just-deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
@ramijarrar
Copy link
Member

ramijarrar commented Jun 12, 2017

Can you check the Kudu deployment log (this will be part of the CLI in the final release)?

I was actually about to upgrade some of our apps to 1.5 as well, so if that's the cause, I'll try to get a fix out in the next few hours.

@ManuelDeLeon
Copy link
Author

I think this is what you want:

npm WARN meteor-dev-bundle@0.0.0 No description
npm WARN meteor-dev-bundle@0.0.0 No repository field.
npm WARN meteor-dev-bundle@0.0.0 No license field.
npm ERR! Invalid version: "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz"

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\local\AppData\npm-cache\_logs\2017-06-12T21_15_05_887Z-debug.log
meteor-azure: Could not rebuild NPM dependencies
D:\Program Files (x86)\SiteExtensions\Kudu\63.60608.2880\bin\Scripts\starter.cmd bash script.sh" stackTrace="   at Kudu.Core.Infrastructure.Executable.ExecuteInternal(ITracer tracer, Func`2 onWriteOutput, Func`2 onWriteError, Encoding encoding, String arguments, Object[] args)
   at Kudu.Core.Infrastructure.Executable.ExecuteWithProgressWriter(ILogger logger, ITracer tracer, String arguments, Object[] args)
   at Kudu.Core.Deployment.Generator.ExternalCommandBuilder.RunCommand(DeploymentContext context, String command, String message)
11354 verbose rebuild bundle D:\local\Temp\8d4b1d7916b3644\bundle\programs\server\npm\node_modules\meteor-node-stubs\node_modules\string_decoder
11355 info build D:\local\Temp\8d4b1d7916b3644\bundle\programs\server\npm\node_modules\meteor-node-stubs\node_modules\string_decoder
11356 verbose stack Error: Invalid version: "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz"
11356 verbose stack     at Object.module.exports.fixVersionField (D:\home\meteor-azure\nvm\v4.8.3\node_modules\npm\node_modules\normalize-package-data\lib\fixer.js:191:13)
11356 verbose stack     at D:\home\meteor-azure\nvm\v4.8.3\node_modules\npm\node_modules\normalize-package-data\lib\normalize.js:32:38
11356 verbose stack     at Array.forEach (native)
11356 verbose stack     at normalize (D:\home\meteor-azure\nvm\v4.8.3\node_modules\npm\node_modules\normalize-package-data\lib\normalize.js:31:15)
11356 verbose stack     at final (D:\home\meteor-azure\nvm\v4.8.3\node_modules\npm\node_modules\read-package-json\read-json.js:349:5)
11356 verbose stack     at then (D:\home\meteor-azure\nvm\v4.8.3\node_modules\npm\node_modules\read-package-json\read-json.js:124:5)
11356 verbose stack     at D:\home\meteor-azure\nvm\v4.8.3\node_modules\npm\node_modules\read-package-json\read-json.js:243:12
11356 verbose stack     at D:\home\meteor-azure\nvm\v4.8.3\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:78:16
11356 verbose stack     at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)
11357 verbose cwd D:\local\Temp\8d4b1d7916b3644\bundle\programs\server\npm
11358 verbose Windows_NT 6.2.9200
11359 verbose argv "D:\\home\\meteor-azure\\nvm\\v4.8.3\\node.exe" "D:\\home\\meteor-azure\\nvm\\v4.8.3\\node_modules\\npm\\bin\\npm-cli.js" "rebuild" "--update-binary"
11360 verbose node v4.8.3
11361 verbose npm  v4.5.0
11362 error Invalid version: "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz"
11363 verbose exit [ 1, true ]

@ramijarrar
Copy link
Member

ramijarrar commented Jun 12, 2017

I've just updated a few apps to 1.5 and they've all deployed without any issues.

Can you paste your NPM dependencies (specifically the version of meteor-node-stubs)?

@ManuelDeLeon
Copy link
Author

meteor-node-stubs is at 0.2.11, now I'm testing with previous versions...

@ramijarrar
Copy link
Member

I've just tested with v0.2.11 and there doesn't seem to be any issues.

Can you paste the rest of the Kudu deployment log?

@ManuelDeLeon
Copy link
Author

Let me update back to 1.5 and 0.2.11 then and I'll paste the whole log.

@ramijarrar
Copy link
Member

👍

@ramijarrar ramijarrar changed the title error: Could not complete server initialisation error: Could not complete server initialisation [v2.0.0-rc.4] Jun 12, 2017
@ManuelDeLeon
Copy link
Author

I deleted node_modules and ran yarn. The app works fine but I get the following error when I try to deploy:

> meteor-azure --settings settings.json --web-config .\.config\azure\web.config

module.js:472
    throw err;
    ^

Error: Cannot find module 'core-js/modules/es7.string.pad-start'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\MyFiles\Meteor\viewmodel.org\node_modules\meteor-azure\distribution\main.js:83:1)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ViewModel.org@ just-deploy: `meteor-azure --settings settings.json --web-config .\.config\azure\web.config`
npm ERR! Exit status 1

Gonna try with npm i instead...

@ManuelDeLeon
Copy link
Author

Here are the logs:

<step title="BackgroundTrace" date="2017-06-12T22:36:56.686" instance="dcec29" url="/deploy" method="POST" >
  <step title="Creating temporary deployment" date="2017-06-12T22:36:56.780" /><!-- duration: 47ms -->
  <step title="Performing fetch based deployment" date="2017-06-12T22:36:56.842" >
    <step title="LibGit2SharpRepository Add Remote" date="2017-06-12T22:36:59.051" >
      <step title="Git remote exists" date="2017-06-12T22:36:59.067" /><!-- duration: 0ms -->
    </step><!-- duration: 31ms -->
    <step title="LibGit2SharpRepository Fetch" date="2017-06-12T22:36:59.082" /><!-- duration: 379ms -->
    <step title="LibGit2SharpRepository Update" date="2017-06-12T22:36:59.461" /><!-- duration: 172ms -->
    <step title="DeploymentManager.Deploy(id:4d4acec5cc5793e29259967a83cde39e335511e2)" date="2017-06-12T22:36:59.649" >
      <step title="Collecting changeset information" date="2017-06-12T22:36:59.681" /><!-- duration: 62ms -->
      <step title="Updating submodules" date="2017-06-12T22:36:59.774" /><!-- duration: 94ms -->
      <step title="Determining deployment builder" date="2017-06-12T22:37:00.024" >
        <step title="Builder is CustomBuilder" date="2017-06-12T22:37:00.039" /><!-- duration: 0ms -->
      </step><!-- duration: 16ms -->
      <step title="Copying SSH keys" date="2017-06-12T22:37:00.102" /><!-- duration: 32ms -->
      <step title="Building" date="2017-06-12T22:37:00.134" >
        <step title="Executing external process" date="2017-06-12T22:37:00.274" type="process" path="starter.cmd" arguments="bash script.sh" >
          <step title="Process dump" date="2017-06-12T22:42:31.408" exitCode="1" type="processOutput" /><!-- duration: 0ms -->
        </step><!-- duration: 331134ms -->
        <step title="Error occurred" date="2017-06-12T22:42:31.486" type="error" text="npm WARN meteor-dev-bundle@0.0.0 No description
npm WARN meteor-dev-bundle@0.0.0 No repository field.
npm WARN meteor-dev-bundle@0.0.0 No license field.
npm ERR! Invalid version: &quot;https://registry.npmjs.org/adal-node/-/adal-node-0.1.22.tgz&quot;

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\local\AppData\npm-cache\_logs\2017-06-12T22_42_30_642Z-debug.log
meteor-azure: Could not rebuild NPM dependencies
D:\Program Files (x86)\SiteExtensions\Kudu\63.60608.2880\bin\Scripts\starter.cmd bash script.sh" stackTrace="   at Kudu.Core.Infrastructure.Executable.ExecuteInternal(ITracer tracer, Func`2 onWriteOutput, Func`2 onWriteError, Encoding encoding, String arguments, Object[] args)
   at Kudu.Core.Infrastructure.Executable.ExecuteWithProgressWriter(ILogger logger, ITracer tracer, String arguments, Object[] args)
   at Kudu.Core.Deployment.Generator.ExternalCommandBuilder.RunCommand(DeploymentContext context, String command, String message)" /><!-- duration: 0ms -->
      </step><!-- duration: 331540ms -->
      <step title="Error occurred" date="2017-06-12T22:42:31.673" type="error" text="npm WARN meteor-dev-bundle@0.0.0 No description
npm WARN meteor-dev-bundle@0.0.0 No repository field.
npm WARN meteor-dev-bundle@0.0.0 No license field.
npm ERR! Invalid version: &quot;https://registry.npmjs.org/adal-node/-/adal-node-0.1.22.tgz&quot;

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\local\AppData\npm-cache\_logs\2017-06-12T22_42_30_642Z-debug.log
meteor-azure: Could not rebuild NPM dependencies
D:\Program Files (x86)\SiteExtensions\Kudu\63.60608.2880\bin\Scripts\starter.cmd bash script.sh" stackTrace="   at Kudu.Core.Infrastructure.Executable.ExecuteInternal(ITracer tracer, Func`2 onWriteOutput, Func`2 onWriteError, Encoding encoding, String arguments, Object[] args)
   at Kudu.Core.Infrastructure.Executable.ExecuteWithProgressWriter(ILogger logger, ITracer tracer, String arguments, Object[] args)
   at Kudu.Core.Deployment.Generator.ExternalCommandBuilder.RunCommand(DeploymentContext context, String command, String message)
   at Kudu.Core.Deployment.Generator.CustomBuilder.Build(DeploymentContext context)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Kudu.Core.Deployment.DeploymentManager.&lt;Build&gt;d__35.MoveNext()" /><!-- duration: 16ms -->
    </step><!-- duration: 332040ms -->
    <step title="Cleaning up temp files" date="2017-06-12T22:42:31.689" 

https://www.dropbox.com/s/ees7vb0oivp2lvn/2017-06-12T22_42_30_642Z-debug.log?dl=0

@ramijarrar
Copy link
Member

ramijarrar commented Jun 12, 2017

Can you paste your package json contents?

It looks like you may have added meteor-azure to your dependencies (should be a dev dependency).

Also FYI, I'm working on a fix for Yarn at the moment.

@ManuelDeLeon
Copy link
Author

I was getting this error (npm/npm#17146) so I ended up putting everything under devDependencies.

{
  "name": "ViewModel.org",
  "private": true,
  "scripts": {
    "start": "meteor run",
    "predeploy": "copyDeps.bat",
    "deploy": "npm run just-deploy",
    "just-deploy": "meteor-azure --settings settings.json --web-config .\\.config\\azure\\web.config"
  },
  "devDependencies": {
    "meteor-azure": "^2.0.0-rc.4",
    "meteor-node-stubs": "^0.2.11",
    "react": "^15.5.4",
    "react-dom": "^15.5.4",
    "viewmodel-react": "^2.0.1",
    "viewmodel-react-explorer": "^1.0.7",
    "viewmodel-react-plugin": "^3.0.0"
  }
}

@ramijarrar
Copy link
Member

ramijarrar commented Jun 12, 2017

The devDependencies shouldn't be included at all in your production build, you should have:

{
  // ...

  "dependencies": {
    "meteor-node-stubs": "^0.2.11",
    "react": "^15.5.4",
    "react-dom": "^15.5.4",
    "viewmodel-react": "^2.0.1",
    "viewmodel-react-explorer": "^1.0.7",
    "viewmodel-react-plugin": "^3.0.0"
  },
  "devDependencies": {
    "meteor-azure": "^2.0.0-rc.4"
  }
}

Make you sure you run meteor npm prune and meteor npm install before attempting another deployment.

@ManuelDeLeon
Copy link
Author

Will do.

@ramijarrar
Copy link
Member

Going to push rc5 in a few hours, which will include better debugging and yarn support.

@ManuelDeLeon
Copy link
Author

And it works! Thank you so much for your time.

@ManuelDeLeon
Copy link
Author

I'm getting this error again with v2.0.1:

> meteor-azure --settings settings.json --web-config .\.config\azure\web.config

module.js:472
    throw err;
    ^

Error: Cannot find module 'core-js/modules/es7.string.pad-start'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\MyFiles\Meteor\viewmodel.org\node_modules\meteor-az
ure\distribution\main.js:83:1)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ViewModel.org@ just-deploy: `meteor-azure --settings settings.json --web
-config .\.config\azure\web.config`
npm ERR! Exit status 1

I don't get the error if I downgrade to -rc.4

@ramijarrar
Copy link
Member

Is this installed locally or globally? What is the output of meteor-azure -v from the same command line?

@ManuelDeLeon
Copy link
Author

Locally (run via npm script), installed via meteor npm i

> meteor-azure -v

module.js:472
    throw err;
    ^

Error: Cannot find module 'core-js/modules/es7.string.pad-start'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\MyFiles\Meteor\viewmodel.org\node_modules\meteor-az
ure\distribution\main.js:83:1)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ViewModel.org@ mav: `meteor-azure -v`
npm ERR! Exit status 1

@ramijarrar
Copy link
Member

ramijarrar commented Jun 16, 2017

Can you try running ./node_modules/.bin/meteor-azure -v from your app directory?

@ManuelDeLeon
Copy link
Author

>.\node_modules\.bin\meteor-azure -v
module.js:472
    throw err;
    ^

Error: Cannot find module 'core-js/modules/es7.string.pad-start'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\MyFiles\Meteor\viewmodel.org\node_modules\meteor-azure\distribution\main.js:83:1)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

@ramijarrar
Copy link
Member

What do your dependencies/devDependencies look like?

Also, can you check your node_modules directory for "core-js" (should be there after installing meteor-azure)

@ManuelDeLeon
Copy link
Author

core-js is there.

  "devDependencies": {
    "meteor-azure": "^2.0.1"
  },
  "dependencies": {
    "meteor-node-stubs": "^0.2.11",
    "react": "^15.5.4",
    "react-dom": "^15.5.4",
    "viewmodel-react": "^2.1.1",
    "viewmodel-react-explorer": "^1.0.7",
    "viewmodel-react-plugin": "^3.0.0"
  }

@ramijarrar
Copy link
Member

ramijarrar commented Jun 16, 2017

I've been trying to reproduce this locally, but the same dependency tree isn't giving me any errors (with yarn or regular npm install).

Can you clear "node_modules" and reinstall dependencies, then try running./node_modules/.bin/meteor-azure -v again.

@ManuelDeLeon
Copy link
Author

I get the same error after deleting node_modules and reinstalling.

@ramijarrar
Copy link
Member

ramijarrar commented Jun 16, 2017

Are you using yarn lock/shrinkwrap? Can you try rebuilding node_modules without them and see if you get the same error (I think there might be some bad dependencies in there from the release candidates)?

@ManuelDeLeon
Copy link
Author

I'm using meteor npm so no lock file.

@ramijarrar
Copy link
Member

Can you create a simple repro?

@ManuelDeLeon
Copy link
Author

I can reproduce on Windows with a blank Meteor 1.5 project and the following package.json:

{
  "name": "ViewModel.org",
  "private": true,
  "devDependencies": {
    "meteor-azure": "^2.0.1"
  },
  "dependencies": {
    "react-dom": "^15.5.4"
  }
}

It works if I remove react-dom

@ManuelDeLeon
Copy link
Author

Forget Meteor, go to a blank folder and create the following package.json:

{
  "name": "meteor-azure-blank",
  "devDependencies": {
    "meteor-azure": "^2.0.1"
  },
  "dependencies": {
    "react-dom": "^15.5.4"
  }
}

> npm i

>.\node_modules\.bin\meteor-azure -v
module.js:472
    throw err;
    ^

Error: Cannot find module 'core-js/modules/es7.string.pad-start'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\MyFiles\Temp\meteor-azure-blank\node_modules\meteor-azure\distribution\main.js:83:1)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

@ramijarrar
Copy link
Member

I've been able to reproduce this, working on a fix at the moment. In the meantime, you can use the package globally or in your app with Yarn.

ramijarrar added a commit that referenced this issue Jun 17, 2017
Fixes nested path issues in #30 until v2.0.0 of babel-preset-env
@ramijarrar
Copy link
Member

ramijarrar commented Jun 17, 2017

Just pushed v2.0.2 which should fix this (was actually a bug in babel), please let me know if you have any further issues.

@ManuelDeLeon
Copy link
Author

Error is gone now. Is it normal for the last step info: Running server initialisation, polling for status... to take so long? For me it takes 15-20mins.

@ManuelDeLeon
Copy link
Author

It deployed the site correctly but v2.0.2 ends with an error:

info:    Running server initialisation, polling for status...
error:   getaddrinfo ENOTFOUND viewmodel.scm.azurewebsites.net viewmodel.scm.azurewebsites.net:443
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ViewModel.org@ just-deploy: `meteor-azure --settings settings.json --web-config .\.config\azure\web.config`
npm ERR! Exit status 1

(it didn't do that before)

@ramijarrar
Copy link
Member

Can you paste the output in debug mode?

Also, would prefer if you created a new issue for this.

@ramijarrar ramijarrar added the bug label Jun 19, 2017
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

2 participants