datopian / flowershow

💐 Publish your obsidian digital garden or any markdown site easily and elegantly.
https://flowershow.app/
MIT License
756 stars 92 forks source link

Can't deploy our Flowershow website v2 to Netlify #495

Closed olayway closed 1 year ago

olayway commented 1 year ago

> @flowershow/template@2.0.2 export
> npm run build && next export

> @flowershow/template@2.0.2 prebuild
> npm run generate

> @flowershow/template@2.0.2 generate
> cross-env NODE_OPTIONS="--experimental-json-modules --experimental-modules" node -r esbuild-register ./scripts/postbuild.mjs

Sitemap generated...
Error: Command failed: npm run export
    at checkExecSyncError (node:child_process:826:11)
    at execSync (node:child_process:900:15)
    at createSyncProcess (/opt/build/repo/node_modules/.pnpm/nx@15.3.3/node_modules/nx/src/executors/run-commands/run-commands.impl.js:166:34)
    at /opt/build/repo/node_modules/.pnpm/nx@15.3.3/node_modules/nx/src/executors/run-commands/run-commands.impl.js:113:13
    at Generator.next (<anonymous>)
    at /opt/build/repo/node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js:167:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/opt/build/repo/node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js:163:16)
    at runSerially (/opt/build/repo/node_modules/.pnpm/nx@15.3.3/node_modules/nx/src/executors/run-commands/run-commands.impl.js:111:20)
    at /opt/build/repo/node_modules/.pnpm/nx@15.3.3/node_modules/nx/src/executors/run-commands/run-commands.impl.js:52:25 {
  status: 13,
  signal: null,
  output: [ null, null, null ],
  pid: 4261,
  stdout: null,
  stderr: null
}

 >  NX   ERROR: Something went wrong in run-commands - Command failed: npm run export

Error: ERROR: Something went wrong in run-commands - Command failed: npm run export
    at /opt/build/repo/node_modules/.pnpm/nx@15.3.3/node_modules/nx/src/executors/run-commands/run-commands.impl.js:59:19
    at Generator.throw (<anonymous>)
    at rejected (/opt/build/repo/node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js:165:69)
olayway commented 1 year ago

Some progress made as the generate script (which among other things indexes the content folder) succeeds. Some other weird error shows up though:

4:20:19 PM: > @flowershow/template@2.0.2 generate
4:20:19 PM: > cross-env NODE_OPTIONS="--experimental-json-modules --experimental-modules" node -r esbuild-register ./scripts/postbuild.mjs
4:20:21 PM: Sitemap generated...
4:20:21 PM: > @flowershow/template@2.0.2 build
4:20:21 PM: > next build
4:20:21 PM: warn  - No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
4:20:21 PM: info  - Skipping linting
4:20:21 PM: info  - Checking validity of types...
4:20:24 PM: Failed to compile.
4:20:24 PM: 
4:20:24 PM: ./components/MdxPage.tsx:3:30
4:20:24 PM: Type error: Cannot find module '@flowershow/core' or its corresponding type declarations.
4:20:24 PM:   1 | import React from "react";
4:20:24 PM:   2 | import { MDXRemote } from "next-mdx-remote";
4:20:24 PM: > 3 | import { Mermaid, Pre } from "@flowershow/core";
4:20:24 PM:     |                              ^
4:20:24 PM:   4 | 
4:20:24 PM:   5 | import layouts from "../layouts";
4:20:24 PM:   6 | 
olayway commented 1 year ago

Ended up creating a separate repository for our Flowershow website, as we consider moving stuff out of monorepo anyway. New repo here: https://github.com/datopian/flowershow-app