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

build: build for netlify edge #72

Closed
wants to merge 3 commits into from
Closed

build: build for netlify edge #72

wants to merge 3 commits into from

Conversation

hi-ogawa
Copy link
Owner

@hi-ogawa hi-ogawa commented Apr 29, 2022

todo

  • environment variables
  • cookie
  • apparently handler crashes (status 502) when bundling all the app
    • strip out some features and see which dependency is the cause
      • remix
        • react
        • loader
      • knex
      • mysql2
      • react-query
      • superjson
      • bcryptjs

knex

  • it could be polyfill bug node-modules-polyfills-commonjs:util
  • patch package everything?
    • knex shouldn't need accessing file system
TypeError: promisify is not a function
    at node_modules/.pnpm/knex@1.0.4_mysql2@2.3.3/node_modules/knex/lib/migrations/util/fs.js (netlify:bundle-combined:19612:20)
    at __require2 (netlify:bundle-combined:885:56)
    at node_modules/.pnpm/knex@1.0.4_mysql2@2.3.3/node_modules/knex/lib/migrations/util/template.js (netlify:bundle-combined:19665:41)
    at __require2 (netlify:bundle-combined:885:56)
    at node_modules/.pnpm/knex@1.0.4_mysql2@2.3.3/node_modules/knex/lib/migrations/migrate/MigrationGenerator.js (netlify:bundle-combined:20964:45)
    at __require2 (netlify:bundle-combined:885:56)
    at node_modules/.pnpm/knex@1.0.4_mysql2@2.3.3/node_modules/knex/lib/migrations/migrate/Migrator.js (netlify:bundle-combined:21030:34)
    at __require2 (netlify:bundle-combined:885:56)
    at node_modules/.pnpm/knex@1.0.4_mysql2@2.3.3/node_modules/knex/lib/knex-builder/make-knex.js (netlify:bundle-combined:22114:29)
    at __require2 (netlify:bundle-combined:885:56)
  • cli feature should be patched to delay initialization
ReferenceError: process is not defined
    at node_modules/.pnpm/colorette@2.0.16/node_modules/colorette/index.cjs (netlify:bundle-combined:20721:20)
    at __require2 (netlify:bundle-combined:885:56)
    at node_modules/.pnpm/knex@1.0.4_mysql2@2.3.3/node_modules/knex/lib/logger.js (netlify:bundle-combined:20865:21)
    at __require2 (netlify:bundle-combined:885:56)
    at node_modules/.pnpm/knex@1.0.4_mysql2@2.3.3/node_modules/knex/lib/migrations/migrate/migrator-configuration-merger.js (netlify:bundle-combined:20923:22)
    at __require2 (netlify:bundle-combined:885:56)
    at node_modules/.pnpm/knex@1.0.4_mysql2@2.3.3/node_modules/knex/lib/migrations/migrate/MigrationGenerator.js (netlify:bundle-combined:20969:36)
    at __require2 (netlify:bundle-combined:885:56)
    at node_modules/.pnpm/knex@1.0.4_mysql2@2.3.3/node_modules/knex/lib/migrations/migrate/Migrator.js (netlify:bundle-combined:21034:34)
    at __require2 (netlify:bundle-combined:885:56)

command to deploy

NODE_ENV=production BUILD_NETLIFY_EDGE=1 npx remix build
netlify build
netlify deploy

@hi-ogawa
Copy link
Owner Author

It is not practically ready to interact with database from deno/netlify-edge.
I will only create POC (like https://github.com/hi-ogawa/remix-netlify-manual-build) using these stack:

  • remix
  • denodb
  • netlify-edge
  • planetscale

@hi-ogawa hi-ogawa closed this Apr 29, 2022
@hi-ogawa hi-ogawa mentioned this pull request Apr 29, 2022
11 tasks
@hi-ogawa hi-ogawa deleted the build-netlify-edge branch May 3, 2022 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore: netlify edge experiment
1 participant