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

docker run have been failed since yarn v3 introduced #9291

Closed
tamaina opened this issue Dec 6, 2022 · 22 comments
Closed

docker run have been failed since yarn v3 introduced #9291

tamaina opened this issue Dec 6, 2022 · 22 comments
Labels
🐛Bug Unexpected behavior 🐋docker Pull requests that update Docker code

Comments

@tamaina
Copy link
Contributor

tamaina commented Dec 6, 2022

$ npm run migrateandstart

> yarn migrate && yarn start

Error: The project in /misskey/package.json doesn't seem to have been installed - running an install there might help

Reason

DockerfileのCOPYはシンボリックリンクをコピーしてくれない(原理上することができなさそう)

docker run時にyarn installを改めて走らせるのはちょっと…

@tamaina tamaina added the ⚠️bug? This might be a bug label Dec 6, 2022
@tamaina tamaina changed the title Ddocker runに docker run fail since yarn v3 introduced Dec 6, 2022
@tamaina tamaina changed the title docker run fail since yarn v3 introduced docker run fails since yarn v3 introduced Dec 6, 2022
@tamaina tamaina changed the title docker run fails since yarn v3 introduced docker run have been failed since yarn v3 introduced Dec 6, 2022
@tamaina tamaina added 🐛Bug Unexpected behavior 🐋docker Pull requests that update Docker code and removed ⚠️bug? This might be a bug labels Dec 6, 2022
@tamaina
Copy link
Contributor Author

tamaina commented Dec 6, 2022

@rinsuki @acid-chicken @ThatOneCalculator なんとかして

@acid-chicken
Copy link
Member

Related to #8764 (comment)

@ThatOneCalculator
Copy link
Contributor

Error: The project in /misskey/package.json doesn't seem to have been installed - running an install there might help

That error can occur when you accidentally run yarn in the directory below the miskey dir. Run cd .. and remove .yarn, node_modules, .yarnrc.yml, etc

@tamaina

This comment was marked as off-topic.

@tamaina
Copy link
Contributor Author

tamaina commented Dec 6, 2022

docker run時にyarn installを改めて走らせるのは最終手段だよね…

@tamaina

This comment was marked as off-topic.

@ThatOneCalculator
Copy link
Contributor

Could you see if you can reproduce the issue with Calckey? I think the way Calckey implemented Yarn 3 is slightly different than that of Misskey.

@rinsuki
Copy link
Contributor

rinsuki commented Dec 6, 2022

.yarn/install-state.gz あたりが必要かも

@tamaina
Copy link
Contributor Author

tamaina commented Dec 7, 2022

node_modulesの中身あったしシンボリックリンクではないらしい?

@tamaina
Copy link
Contributor Author

tamaina commented Dec 7, 2022

.yarn/install-state.gz あたりが必要かも

これがビンゴだと思う

@tamaina
Copy link
Contributor Author

tamaina commented Dec 7, 2022

.yarn/install-state.gz あたりが必要かも

これがビンゴだと思う

ローカルでは動いたけどOktetoではダメだった

@tamaina

This comment was marked as off-topic.

@tamaina

This comment was marked as off-topic.

@rinsuki
Copy link
Contributor

rinsuki commented Dec 7, 2022

どこかのタイミングでシンボリックリンク先にするべきパスが変わることがある?

root@bfb96f24e2c0:/misskey# yarn run migrateandstart
Error during migration run:
Error: Unable to open file: "/misskey/packages/backend/ormconfig.js". Cannot find package 'typeorm' imported from /misskey/packages/backend/ormconfig.js
    at CommandUtils.loadDataSource (/misskey/node_modules/.store/typeorm-virtual-64a74d098c/node_modules/typeorm/commands/CommandUtils.js:22:19)
    at async Object.handler (/misskey/node_modules/.store/typeorm-virtual-64a74d098c/node_modules/typeorm/commands/MigrationRunCommand.js:41:26)
root@bfb96f24e2c0:/misskey# ls -l packages/backend/node_modules/typeorm 
lrwxrwxrwx 1 root root 76 Dec  3 15:16 packages/backend/node_modules/typeorm -> ../../../node_modules/.store/typeorm-virtual-4475c43461/node_modules/typeorm
root@bfb96f24e2c0:/misskey# ls -l node_modules/.store | grep typeorm
drwxr-xr-x 3 root root 4096 Dec  7 21:48 typeorm-virtual-64a74d098c

@rinsuki
Copy link
Contributor

rinsuki commented Dec 7, 2022

これホストから packages/*/node_modules 持ってきちゃってるからか (直しておきます)

@tamaina
Copy link
Contributor Author

tamaina commented Dec 7, 2022

ホストから packages/*/node_modules 持ってきちゃってるから

あ〜、dockerignoreか

@tamaina
Copy link
Contributor Author

tamaina commented Dec 7, 2022

とはいえdockerignoreはOktetoで動かないのとは関係ないかも(ホストでyarn installしているわけではないしnodeすらインストールしない)

@rinsuki
Copy link
Contributor

rinsuki commented Dec 7, 2022

それもそうだな (それはそうとして Okteto のログってどっかで見れるの)

@tamaina
Copy link
Contributor Author

tamaina commented Dec 7, 2022

しゅいろに頼めば出てくる

#9281 (comment)

@tamaina
Copy link
Contributor Author

tamaina commented Dec 22, 2022

これなんで治ったんだっけ

@tamaina
Copy link
Contributor Author

tamaina commented Dec 25, 2022

これなんで治ったんだっけ(2回目)

@tamaina
Copy link
Contributor Author

tamaina commented Dec 25, 2022

#9239

これかな

@tamaina tamaina closed this as completed Dec 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛Bug Unexpected behavior 🐋docker Pull requests that update Docker code
Projects
None yet
Development

No branches or pull requests

4 participants