-
Notifications
You must be signed in to change notification settings - Fork 115
Emulator fails to start #77
Comments
I run |
Re-opening this issue as I keep having to kill the node process because the emulator stops responding. |
I'm going to need you to provide as many details as possible for me to be able to reproduce this locally. Node.js version, Emulator version, output of |
Node -v => v6.9.1 package.json {
"name": "channel-site-frame",
"version": "1.1.0",
"description": "",
"main": "build.js",
"dependencies": {
"ajv": "^3.4.0",
"babel-core": "^6.17.0",
"babel-preset-es2015": "^6.16.0",
"babel-preset-react": "^6.16.0",
"babel-preset-stage-2": "^6.17.0",
"babelify": "7.3.0",
"browserify": "13.1.0",
"chai": "^3.5.0",
"consolidate": "^0.13.1",
"es6-promise": "^3.1.2",
"eslint": "^3.7.1",
"fbjs": "^0.8.6",
"fs": "0.0.2",
"fs-extra": "^0.30.0",
"fs-walk": "0.0.1",
"gulp": "^3.9.0",
"gulp-autoprefixer": "^3.1.0",
"gulp-browserify": "^0.5.1",
"gulp-clean": "^0.3.1",
"gulp-css-base64": "^1.3.4",
"gulp-cssnano": "^2.1.1",
"gulp-eslint": "^3.0.1",
"gulp-front-matter": "^1.2.3",
"gulp-gzip": "^1.2.0",
"gulp-htmlmin": "^1.3.0",
"gulp-htmltidy": "^0.2.2",
"gulp-imagemin": "^2.4.0",
"gulp-inject": "^3.0.0",
"gulp-inline-image-html": "^0.2.1",
"gulp-inline-source": "^2.1.0",
"gulp-minify": "0.0.5",
"gulp-minify-css": "^1.2.3",
"gulp-rename": "^1.2.2",
"gulp-rev": "^7.0.0",
"gulp-rev-replace": "^0.4.3",
"gulp-run-sequence": "^0.3.2",
"gulp-sass": "^2.2.0",
"gulp-sass-lint": "^1.2.0",
"gulp-serve": "^1.2.0",
"gulp-sourcemaps": "^1.6.0",
"gulp-style-inject": "0.0.3",
"gulp-svg-symbols": "^2.0.0",
"gulp-uglify": "^1.5.3",
"gulp-util": "^3.0.6",
"gulpsmith": "^0.5.5",
"handlebars": "^4.0.2",
"harmonize": "^1.4.4",
"imagemin-pngquant": "^4.2.0",
"imagemin-svgo": "^4.2.0",
"isomorphic-fetch": "^2.2.1",
"lodash.assign": "^3.2.0",
"lodash.escape": "^4.0.1",
"metalsmith": "^2.0.1",
"metalsmith-changed": "^0.2.0",
"metalsmith-excerpts": "^1.0.0",
"metalsmith-fingerprint": "^1.0.3",
"metalsmith-layouts": "^1.6.4",
"metalsmith-markdown": "^0.2.1",
"metalsmith-partial": "^0.1.0",
"metalsmith-permalinks": "^0.4.0",
"metalsmith-publish": "^0.1.3",
"metalsmith-register-helpers": "^0.1.2",
"metalsmith-serve": "0.0.4",
"mocha": "^2.5.3",
"moment": "^2.12.0",
"node-promise": "^0.5.12",
"node-rest-client": "^1.5.1",
"raven": "^0.11.0",
"react": "^0.14.7",
"require-dir": "0.3.0",
"shrinkwrap": "^0.4.0",
"sinon": "^1.17.6",
"through2": "^2.0.1",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0",
"yargs": "^3.32.0"
},
"scripts": {
"test": "./node_modules/.bin/mocha ./src/tests/**; echo ''",
"lint-js": "./node_modules/.bin/eslint --fix ./src; echo ''",
"lint-scss": "./node_modules/.bin/sass-lint -c './node_modules/@theladbiblegroup/scss-linter/.scsslint.yaml' './src/scss/**/*.scss' -v -q; echo ''",
"fractal": "gulp fractal && gulp serve"
},
"author": "Jason Brown",
"license": "ISC",
"devDependencies": {
"@frctl/consolidate": "^1.0.1",
"@frctl/fractal": "^1.0.11",
"browserify": "^13.3.0",
"gulp-babel": "^6.1.2",
"gulp-browserify": "^0.5.1",
"gulp-string-replace": "^0.4.0",
"through2": "^2.0.3"
}
} My cloud function code... (some of this is hacky as we're trying to wrap some static site build functions which are in gulp). But it does work. The problems arise when we attempt to re-deploy a function to the emulator etc /**
* Cloud functions
*
* This is the Google Cloud Functions file
* for building the site within GC.
*
* @author Ewan Valentine <ewan@theladbible.com>
* @copyright LADbible Group - 2017
*/
const gulp = require('gulp');
const yargs = require('yargs');
require('./gulpfile.js');
/**
* generateContentMatter
*
* @param {Event} event
* @param {func} callback
*/
exports.generateContentMatter = function generateContentMatter(req, res) {
const { id } = req.body
return Promise.resolve()
.then(() => {
if (req.method !== 'POST') {
const err = new Error('Expecting a POST request?')
err.code = 405
throw err
}
if (gulp.tasks['css']) {
gulp.start('css', () => {
console.log('Finished CSS.')
return true
});
}
})
.then(() => {
if (gulp.tasks['build-resource']) {
yargs.default('--id', id)
gulp.start('build-resource', () => {
console.log('Finished!')
res.send('Done m9').end()
})
}
})
.catch(err => {
res.status(err.code).send(`Shit: ${err.message}.`);
})
} Emulator version, I did npm uninstall and installed again just now, so it'll be the very latest. |
What version of the Emulator do you have installed? |
|
I have similar problems with killing the process. If an error occurs in a function I get this message:
After that, simply deploy a function like this
and call it. when the error appears, the emulator is in nowhere land |
I'll be publishing another version soon that will hopefully solve your issue. |
I released 1.0.0-alpha.16, can you see if it works better for you? |
Description
Emulator hangs on start
Steps to reproduce
On OSX, using node -v
v6.9.1
, runfunctions-emulator start
.I currently see
Starting Google Cloud Functions Emulator...
indefinitely.Thanks!
The text was updated successfully, but these errors were encountered: