misskey-dev / misskey

🌎 A completely free and open interplanetary microblogging platform 🚀
https://misskey-hub.net/
GNU Affero General Public License v3.0
10k stars 1.36k forks source link

ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  misskey-js@0.0.15 build: `tsc` #10957

Open MomentQYC opened 1 year ago

MomentQYC commented 1 year ago

💡 Summary

After upgrading to Misskey 13.13.0, using the NODE_ENV=production pnpm run build command throws an exception No changes to any files in packages/misskey-js

🥰 Expected Behavior

Normal build

🤬 Actual Behavior

Unable to build

Scope: 4 of 5 workspace projects
packages/misskey-js build$ tsc
│ node:internal/modules/cjs/loader:1078
│   throw err;
│   ^
│ Error: Cannot find module ' /path/to/misskey/node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/bin
│     at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
│     at Module._load (node:internal/modules/cjs/loader:920:27)
│     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
│     at node:internal/main/run_main_module:23:47 {
│   code: 'MODULE_NOT_FOUND',
│   requireStack: []
│ }
│ Node.js v18.16.0
└─ Failed in 122ms at /path/to/misskey/packages/misskey-js
/path/to/misskey/packages/misskey-js:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  misskey-js@0.0.15 build: `tsc`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.

📝 Steps to Reproduce

  1. git pull
  2. git submodule update --init
  3. NODE_ENV=production pnpm install --frozen-lockfile
  4. NODE_ENV=production pnpm run build

📌 Environment

Misskey version: 13.13.0 Your OS: (Server) Ubuntu 20.04 Nodejs 18.16.0 pnpm 8.6.0

tamaina commented 1 year ago

path/toは置き換えたのか

MomentQYC commented 1 year ago

path/toは置き換えたのか

The meaning here is Misskey's folder, like /home/misskey

tamaina commented 1 year ago

I can't reproduce it in the environment at hand, but I don't know why (is it possible to build?)

tamaina commented 1 year ago

I'm thinking this is due to the lack of typescript, etc. in the dependencies.

tamaina commented 1 year ago

In misskey-js/package.json, can you try moving typescript and @types to dependencies?

MomentQYC commented 1 year ago

In misskey-js/package.json, can you try moving typescript and @types to dependencies?

I added "typescript": "5.0.4" to dependencies and it works fine.

lucyrose39 commented 1 year ago

Can confirm I also have this issue with the same error, however with a server running debian 11.

lucyrose39 commented 1 year ago

Can confirm I also have this issue with the same error, however with a server running debian 11.

Resolved by installing global typescript compiler

iruuuuull commented 2 months ago

image

how to fix this issue? already 2 day can't fix this.

This error is obtained if run with docker file.

On normal build executed successfully