transfem-org / Sharkey

🌎 A Sharkish microblogging platform πŸš€
https://joinsharkey.org/
73 stars 19 forks source link

build error related to megalodon #111

Closed tastytea closed 10 months ago

tastytea commented 10 months ago

the issue was already reported but the solution was not shared.

πŸ’‘ Summary

the build process errors when coming to packages/megalodon. i'm using the build instructions on misskey-hub since i didn't find sharkey specific instructions.

πŸ₯° Expected Behavior

build succeeds

🀬 Actual Behavior

excerpt of the errors:

packages/megalodon build: src/friendica.ts(3,29): error TS7016: Could not find a declaration file for module 'parse-link-header'. '/opt/misskey/sharkey/node_modules/.pnpm/parse-link-header@2.0.0/node_modules/parse-link-header/index.js' implicitly has an 'any' type.
packages/megalodon build:   Try `npm i --save-dev @types/parse-link-header` if it exists or add a new declaration (.d.ts) file containing `declare module 'parse-link-header';`

β†’ full build log

πŸ“ Steps to Reproduce

  1. check out fresh sharkey stable branch
  2. git submodule update --init
  3. NODE_ENV=production pnpm install --frozen-lockfile
  4. NODE_ENV=production pnpm run build

πŸ“Œ Environment

πŸ›° Backend (for server admin)

Mar0xy commented 10 months ago

Please use install without NODE_ENV as obviously dev packages like typing don't get installed then

tastytea commented 10 months ago

thanks, that worked. i don't see how this would be obvious to someone who doesn't program with nodejs though.

Mar0xy commented 10 months ago

This issue will be gone after the rewrite of the Mastodon API as megalodon will be dropped out of the packages that are needed then.