beyonk-group / now-v2-ghost

Experiment trying to get ghost to run on now's v2 platform
MIT License
7 stars 1 forks source link

Stopped working with Zeit Now v2 #1

Open wethinkagile opened 5 years ago

wethinkagile commented 5 years ago

Stopped working with Zeit Now v2

antony commented 5 years ago

@meshfields any more details than that?

etamity commented 5 years ago

I got this error: 502: An error occurred with your deployment Code: NO_STATUS_CODE_FROM_LAMBDA (more)

Here is my config:

{
  "version": 2,
  "name": "website-musiz",
  "routes": [
    { "src": "/.*", "dest": "server.js" }
  ],
  "builds": [
    {
      "src": "*.js",
      "use": "@now/node-server",
      "config": { "maxLambdaSize": "20mb" }
    },
    {
      "src": ".env",
      "use": "@now/static"
    }
  ],
  "alias": [
    "https://website-musiz.etamity.now.sh"
  ],
  "env": {
    "NODE_ENV": "production"
  },
  "regions": [
    "lhr"
  ]
}

this is the logs


BUILD/config.jsApr 13 2019 16:37:33:520 | installing dependencies for ncc...
-- | --
BUILD/config.jsApr 13 2019 16:37:33:520 | installing to /tmp/589b8fc6/ncc
BUILD/config.jsApr 13 2019 16:37:33:681 | yarn install v1.13.0
BUILD/config.jsApr 13 2019 16:37:33:705 | [1/4] Resolving packages...
BUILD/config.jsApr 13 2019 16:37:33:726 | success Already up-to-date.
BUILD/config.jsApr 13 2019 16:37:33:727 | Done in 0.05s.
BUILD/server.jsApr 13 2019 16:37:37:261 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/ghost/core/server/web/site" attempted to require "hbs" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:37:40:788 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/ghost/node_modules/knex-migrator/node_modules/knex/lib/dialects/postgres" attempted to require "pg-query-stream" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:37:40:806 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/ghost/node_modules/knex-migrator/node_modules/knex/lib/dialects/postgres" attempted to require "pg" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:37:40:806 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/ghost/node_modules/knex-migrator/node_modules/knex/lib/dialects/redshift" attempted to require "pg" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:37:41:237 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/bunyan/lib" attempted to require "source-map-support" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:37:42:614 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/jsdom/lib/jsdom" attempted to require "canvas" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:37:52:226 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/ghost/node_modules/knex-migrator/node_modules/knex/lib/dialects/mssql" attempted to require "mssql" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:37:52:226 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/ghost/node_modules/knex-migrator/node_modules/knex/lib/dialects/mssql" attempted to require "mssql" but could not be resolved, assuming external. ncc: Module directory "/tmp/5e9436cb/user/node_modules/ghost/node_modules/knex-migrator/node_modules/knex/lib/dialects/mssql" attempted to require "mssql" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:37:52:227 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/ghost/node_modules/knex-migrator/node_modules/knex/lib/dialects/mssql" attempted to require "tedious" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:37:52:256 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/node-pre-gyp/lib/util" attempted to require "npm" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:37:52:256 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/node-pre-gyp/lib/util" attempted to require "node-gyp" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:37:52:278 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/ghost/node_modules/knex-migrator/node_modules/knex/lib/dialects/mysql2" attempted to require "mysql2" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:37:52:310 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/ghost/node_modules/knex-migrator/node_modules/knex/lib/dialects/oracle" attempted to require "oracle" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:37:52:352 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/ghost/node_modules/knex-migrator/node_modules/knex/lib/dialects/oracledb" attempted to require "oracledb" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:37:54:743 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/ws/lib" attempted to require "bufferutil" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:37:54:744 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/ws/lib" attempted to require "utf-8-validate" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:38:03:192 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/knex/lib/dialects/mssql" attempted to require "mssql" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:38:03:293 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/knex/lib/dialects/strong-oracle" attempted to require "strong-oracle" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:38:03:306 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/knex/lib/dialects/maria" attempted to require "mariasql" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:38:04:780 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/knex/lib/dialects/mysql2" attempted to require "mysql2" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:38:04:781 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/knex/lib/dialects/oracle" attempted to require "oracle" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:38:05:010 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/knex/lib/dialects/oracledb" attempted to require "oracledb" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:38:05:037 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/knex/lib/dialects/postgres" attempted to require "pg-query-stream" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:38:05:039 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/knex/lib/dialects/postgres" attempted to require "pg" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:38:05:039 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/knex/lib/dialects/redshift" attempted to require "pg" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:38:08:598 | ncc: Module directory "/tmp/5e9436cb/user/node_modules/got" attempted to require "electron" but could not be resolved, assuming external.
BUILD/server.jsApr 13 2019 16:39:04:074 | running builder.exports.prepareCache...
BUILD/server.jsApr 13 2019 16:39:05:752 | downloading user files...
BUILD/server.jsApr 13 2019 16:39:06:137 | installing dependencies for user's code...
BUILD/server.jsApr 13 2019 16:39:06:138 | installing to /tmp/7afd04c1/user
BUILD/server.jsApr 13 2019 16:39:06:407 | yarn install v1.13.0
BUILD/server.jsApr 13 2019 16:39:06:566 | [1/4] Resolving packages...
BUILD/server.jsApr 13 2019 16:39:07:257 | success Already up-to-date.
BUILD/server.jsApr 13 2019 16:39:07:264 | Done in 0.86s.
BUILD/server.jsApr 13 2019 16:39:07:271 | writing ncc package.json...
BUILD/server.jsApr 13 2019 16:39:07:273 | installing dependencies for ncc...
BUILD/server.jsApr 13 2019 16:39:07:273 | installing to /tmp/7afd04c1/ncc
BUILD/server.jsApr 13 2019 16:39:07:548 | yarn install v1.13.0
BUILD/server.jsApr 13 2019 16:39:07:596 | [1/4] Resolving packages...
BUILD/server.jsApr 13 2019 16:39:07:638 | success Already up-to-date.
BUILD/server.jsApr 13 2019 16:39:07:642 | Done in 0.10s.
OUTPUT/server.jsApr 13 2019 16:39:07:205 | module initialization error: Error
OUTPUT/server.jsApr 13 2019 16:39:07:250 | REPORT RequestId: a70dcc0f-1b51-4ac2-b479-27ef99194177    Duration: 46.71 ms  Billed Duration: 100 ms   Memory Size: 3008 MB  Max Memory Used: 488 MB
OUTPUT/server.jsApr 13 2019 16:39:07:250 | module initialization error Error
wethinkagile commented 5 years ago

I will need to reproduce, takes me some time to see if same error.

etamity commented 5 years ago

@antony I have tried your repo from scratch, and deploy it to now, but also getting this ncc error :

ncc: Module directory "/tmp/5e9436cb/user/node_modules/ghost/core/server/web/site" attempted to require "hbs" but could not be resolved, assuming external. Do you have idea about this issue?

antony commented 5 years ago

@etamity sounds like it's missing the handlebars module?

etamity commented 5 years ago

@antony it should included in ghost node_modules, I cloned this repo and tried to deploy, and it got the same error, wondering how did you deploy it? Maybe i missed some steps

antony commented 5 years ago

@etamity just to be completely clear, I haven't yet had ghost working on Now v2. I can deploy it on Now v1, and submitted a now-example to demonstrate, but I haven't got it to work on Now v2 yet.

The original thread is here: https://github.com/zeit/now-examples/issues/50

The spectrum chat I initiated regarding this specific project is here: https://spectrum.chat/?t=59bcb54f-6a0a-465b-b630-a2f9b9d11c1e

wethinkagile commented 4 years ago

I'm on this now again with the willpower to resolve it. After some fiddling I am now running into Caspar Theme missing error, which is strange.

installing build runtime...
build runtime installed: 791.946ms
obtaining caches...
installing to /tmp/4901e137

> dtrace-provider@0.8.8 install /tmp/4901e137/node_modules/dtrace-provider
> node-gyp rebuild || node suppress-error.js

make: Entering directory `/tmp/4901e137/node_modules/dtrace-provider/build'
  TOUCH Release/obj.target/DTraceProviderStub.stamp
make: Leaving directory `/tmp/4901e137/node_modules/dtrace-provider/build'

> sqlite3@4.0.9 install /tmp/4901e137/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

node-pre-gyp

WARN Using request for node-pre-gyp https download

[sqlite3] Success: "/tmp/4901e137/node_modules/sqlite3/lib/binding/node-v64-linux-x64/node_sqlite3.node" is installed via remote

> sharp@0.23.0 install /tmp/4901e137/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

info

sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.8.1/libvips-8.8.1-linux-x64.tar.gz

> core-js@2.6.9 postinstall /tmp/4901e137/node_modules/core-js
> node scripts/postinstall || echo "ignore"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

> jsonpath@1.0.2 postinstall /tmp/4901e137/node_modules/jsonpath
> node lib/aesprim.js > generated/aesprim-browser.js

added 1029 packages from 785 contributors and audited 11422 packages in 27.782s
found 7 vulnerabilities (2 moderate, 5 high)
  run `npm audit fix` to fix them, or `npm audit` for details
running "npm run build"

> now-v2-demo@1.0.3 build /tmp/4901e137
> node server.js

[2019-09-17 21:14:42] INFO Creating table: posts
[2019-09-17 21:14:42] INFO Creating table: users
[2019-09-17 21:14:42] INFO Creating table: posts_authors
[2019-09-17 21:14:42] INFO Creating table: roles
[2019-09-17 21:14:42] INFO Creating table: roles_users
[2019-09-17 21:14:42] INFO Creating table: permissions
[2019-09-17 21:14:42] INFO Creating table: permissions_users
[2019-09-17 21:14:42] INFO Creating table: permissions_roles
[2019-09-17 21:14:42] INFO Creating table: permissions_apps
[2019-09-17 21:14:42] INFO Creating table: settings
[2019-09-17 21:14:42] INFO Creating table: tags
[2019-09-17 21:14:42] INFO Creating table: posts_tags
[2019-09-17 21:14:42] INFO Creating table: apps
[2019-09-17 21:14:42] INFO Creating table: app_settings
[2019-09-17 21:14:42] INFO Creating table: app_fields
[2019-09-17 21:14:42] INFO Creating table: clients
[2019-09-17 21:14:42] INFO Creating table: client_trusted_domains
[2019-09-17 21:14:42] INFO Creating table: accesstokens
[2019-09-17 21:14:42] INFO Creating table: refreshtokens
[2019-09-17 21:14:42] INFO Creating table: subscribers
[2019-09-17 21:14:42] INFO Creating table: invites
[2019-09-17 21:14:42] INFO Creating table: brute
[2019-09-17 21:14:43] INFO Creating table: webhooks
[2019-09-17 21:14:43] INFO Creating table: sessions
[2019-09-17 21:14:43] INFO Creating table: integrations
[2019-09-17 21:14:43] INFO Creating table: api_keys
[2019-09-17 21:14:43] INFO Creating table: mobiledoc_revisions
[2019-09-17 21:14:43] INFO Creating table: members
[2019-09-17 21:14:43] INFO Creating table: actions
[2019-09-17 21:14:43] INFO Model: Tag
[2019-09-17 21:14:43] INFO Model: Client
[2019-09-17 21:14:43] INFO Model: Role
[2019-09-17 21:14:43] INFO Model: Permission
[2019-09-17 21:14:43] INFO Model: User
[2019-09-17 21:14:43] INFO Model: Post
[2019-09-17 21:14:43] INFO Model: Integration
[2019-09-17 21:14:43] INFO Relation: Role to Permission
[2019-09-17 21:14:44] INFO Relation: Post to Tag
[2019-09-17 21:14:44] INFO Relation: User to Role
[2019-09-17 21:14:45] ERROR The currently active theme "casper" is missing.

The currently active theme "casper" is missing.

"name: casper"
"path: /tmp/4901e137/content/themes/"

Error ID:
    2c337a80-d990-11e9-80a7-d12531cf38db

Error Code: 
    ENOENT

----------------------------------------

NotFoundError: Package not found
    at new NotFoundError (/tmp/4901e137/node_modules/ghost-ignition/lib/errors/index.js:93:23)
    at /tmp/4901e137/node_modules/ghost/core/server/lib/fs/package-json/read.js:57:35
    at tryCatcher (/tmp/4901e137/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/tmp/4901e137/node_modules/bluebird/js/release/promise.js:517:31)
    at Promise._settlePromise (/tmp/4901e137/node_modules/bluebird/js/release/promise.js:574:18)
    at Promise._settlePromise0 (/tmp/4901e137/node_modules/bluebird/js/release/promise.js:619:10)
    at Promise._settlePromises (/tmp/4901e137/node_modules/bluebird/js/release/promise.js:695:18)
    at _drainQueueStep (/tmp/4901e137/node_modules/bluebird/js/release/async.js:138:12)
    at _drainQueue (/tmp/4901e137/node_modules/bluebird/js/release/async.js:131:9)
    at Async._drainQueues (/tmp/4901e137/node_modules/bluebird/js/release/async.js:147:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/tmp/4901e137/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)

Error: ENOENT: no such file or directory, stat '/tmp/4901e137/content/themes/casper'

(node:562) UnhandledPromiseRejectionWarning: IncorrectUsageError: We detected a misuse. Please read the stack trace.
    at new IncorrectUsageError (/tmp/4901e137/node_modules/ghost-ignition/lib/errors/index.js:85:23)
    at Object.getStorage (/tmp/4901e137/node_modules/ghost/core/server/adapters/storage/index.js:60:19)
    at setupSiteApp (/tmp/4901e137/node_modules/ghost/core/server/web/site/app.js:123:93)
    at setupParentApp (/tmp/4901e137/node_modules/ghost/core/server/web/parent-app.js:50:36)
    at Child.settings.init.then.then.then (/tmp/4901e137/node_modules/ghost/core/server/index.js:106:52)
    at Child.tryCatcher (/tmp/4901e137/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/tmp/4901e137/node_modules/bluebird/js/release/promise.js:517:31)
    at Promise._settlePromise (/tmp/4901e137/node_modules/bluebird/js/release/promise.js:574:18)
    at Promise._settlePromise0 (/tmp/4901e137/node_modules/bluebird/js/release/promise.js:619:10)
    at Promise._settlePromises (/tmp/4901e137/node_modules/bluebird/js/release/promise.js:699:18)
    at _drainQueueStep (/tmp/4901e137/node_modules/bluebird/js/release/async.js:138:12)
    at _drainQueue (/tmp/4901e137/node_modules/bluebird/js/release/async.js:131:9)
    at Async._drainQueues (/tmp/4901e137/node_modules/bluebird/js/release/async.js:147:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/tmp/4901e137/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)

Error: Cannot find module '/tmp/4901e137/content/adapters/LocalFileStorage'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.getStorage (/tmp/4901e137/node_modules/ghost/core/server/adapters/storage/index.js:57:42)
    at setupSiteApp (/tmp/4901e137/node_modules/ghost/core/server/web/site/app.js:123:93)
    at setupParentApp (/tmp/4901e137/node_modules/ghost/core/server/web/parent-app.js:50:36)
    at Child.settings.init.then.then.then (/tmp/4901e137/node_modules/ghost/core/server/index.js:106:52)
    at Child.tryCatcher (/tmp/4901e137/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/tmp/4901e137/node_modules/bluebird/js/release/promise.js:517:31)
    at Promise._settlePromise (/tmp/4901e137/node_modules/bluebird/js/release/promise.js:574:18)
    at Promise._settlePromise0 (/tmp/4901e137/node_modules/bluebird/js/release/promise.js:619:10)
    at Promise._settlePromises (/tmp/4901e137/node_modules/bluebird/js/release/promise.js:699:18)
    at _drainQueueStep (/tmp/4901e137/node_modules/bluebird/js/release/async.js:138:12)
    at _drainQueue (/tmp/4901e137/node_modules/bluebird/js/release/async.js:131:9)
    at Async._drainQueues (/tmp/4901e137/node_modules/bluebird/js/release/async.js:147:5)
(node:562) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:562) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.