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

make run-clojure fails #21887

Open
jo-mut opened this issue Jan 6, 2025 · 4 comments
Open

make run-clojure fails #21887

jo-mut opened this issue Jan 6, 2025 · 4 comments
Assignees
Labels

Comments

@jo-mut
Copy link
Contributor

jo-mut commented Jan 6, 2025

Problem

make run-clojure fails with the following message

make run-clojure                                        
yarn shadow-cljs watch mobile
Configuring Nix shell for target 'clojure'...
Node modules not created by Nix
Copying node_modules from Nix store:
 - /nix/store/h6cvkw9rmr40ilqs0aavx0cb3dq9wgcr-status-mobile-node-deps-2.32.0-patched
Done in: 14.962s
Internal Error: StatusIm-Mobile@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
    at V0.getCandidates (/Users/john/.yarn/releases/yarn-3.6.4.cjs:435:5145)
    at kf.getCandidates (/Users/john/.yarn/releases/yarn-3.6.4.cjs:391:1264)
    at /Users/john/.yarn/releases/yarn-3.6.4.cjs:439:8033
    at df (/Users/john/.yarn/releases/yarn-3.6.4.cjs:390:11070)
    at ge (/Users/john/.yarn/releases/yarn-3.6.4.cjs:439:8013)
    at async Promise.allSettled (index 0)
    at async io (/Users/john/.yarn/releases/yarn-3.6.4.cjs:390:10398)
    at async /Users/john/.yarn/releases/yarn-3.6.4.cjs:439:8545
    at async ti.startProgressPromise (/Users/john/.yarn/releases/yarn-3.6.4.cjs:390:47651)
    at async je.resolveEverything (/Users/john/.yarn/releases/yarn-3.6.4.cjs:439:6573)
make: *** [run-clojure] Error 1

after installing packages inside shell

➤ YN0000: └ Completed in 2m 3s
➤ YN0000: ┌ Fetch step
➤ YN0013: │ yargs@npm:13.3.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:15.4.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:17.6.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:17.7.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yocto-queue@npm:0.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 1s 365ms
➤ YN0000: ┌ Link step
➤ YN0007: │ nodemon@npm:2.0.16 must be built because it never has been before or the last one failed
➤ YN0007: │ bufferutil@npm:4.0.8 must be built because it never has been before or the last one failed
➤ YN0007: │ es5-ext@npm:0.10.64 must be built because it never has been before or the last one failed
➤ YN0007: │ utf-8-validate@npm:5.0.10 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js@npm:2.6.12 must be built because it never has been before or the last one failed
➤ YN0007: │ StatusIm-Mobile@workspace:. must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 25s 134ms```

downgrading yarn to version 1.22.22 did not fix the issue. It's probably something to do with my dev enviroment. 

@siddarthkay



@siddarthkay
Copy link
Contributor

Hey @jo-mut : could you please post your current yarn version and get new logs from yarn 1.x ?
The attached logs seem like yarn 3.x to me.

I will try to reproduce this with yarn3 and discuss the migration within infra to explore possibilities of this upgrade.

Currently the yarn2nix nix derivation we use does not support lock files generated by newer versions of yarn so we'll have to do some research on that front.

@jo-mut
Copy link
Contributor Author

jo-mut commented Jan 7, 2025

@siddarthkay

yarn version 1.22.22

yarn shadow-cljs watch mobile
Configuring Nix shell for target 'clojure'...
error:
       … while calling the 'derivationStrict' builtin

         at /derivation-internal.nix:9:12:

            8|
            9|   strict = derivationStrict drvAttrs;
             |            ^
           10|

       … while evaluating derivation 'status-mobile-shell'
         whose name attribute is located at /nix/store/x2ixpln8n61hsqb5z117r220swz77y6j-source/pkgs/stdenv/generic/make-derivation.nix:333:7

       … while evaluating attribute '__impureHostDeps' of derivation 'status-mobile-shell'

         at /nix/store/x2ixpln8n61hsqb5z117r220swz77y6j-source/pkgs/stdenv/generic/make-derivation.nix:448:7:

          447|       __propagatedSandboxProfile = unique (computedPropagatedSandboxProfile ++ [ propagatedSandboxProfile ]);
          448|       __impureHostDeps = computedImpureHostDeps ++ computedPropagatedImpureHostDeps ++ __propagatedImpureHostDeps ++ __impureHostDeps ++ stdenv.__extraImpureHostDeps ++ [
             |       ^
          449|         "/dev/zero"

       error: path '/nix/store/x2ixpln8n61hsqb5z117r220swz77y6j-source/pkgs/development/tools/yarn' does not exist

@ilmotta ilmotta added the infra label Jan 7, 2025
@jo-mut
Copy link
Contributor Author

jo-mut commented Jan 7, 2025

after a clean nix installation and with yarn 1.22.22

`Node modules not created by Nix
Copying node_modules from Nix store:

  • /nix/store/h6cvkw9rmr40ilqs0aavx0cb3dq9wgcr-status-mobile-node-deps-2.32.0-patched
    Done in: 18.834s
    error This project's package.json defines "packageManager": "yarn@4.6.0". However the current global version of Yarn is 1.22.22.

Presence of the "packageManager" field indicates that the project is meant to be used with Corepack, a tool included by default with all official Node.js distributions starting from 16.9 and 14.19.
Corepack must currently be enabled by running corepack enable in your terminal. For more information, check out https://yarnpkg.com/corepack.
make: *** [run-clojure] Error 1`

@jo-mut
Copy link
Contributor Author

jo-mut commented Jan 7, 2025

Work fine now

I did not exactly figure out the issue but i think i had two different versions of yarn in my enviroment.

I cleared up yarn from the system and enabled corepack, activated yarn version 4.6.0 using corepack and now make run-clojure work fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

3 participants