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

Install for CLI instructions outdated and not working with yarn version 2+, upgrade method unclear with lockfile issues #23

Open
acsr opened this issue Jan 26, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@acsr
Copy link

acsr commented Jan 26, 2024

My Initial Install

I tried to upgrade my working initial publish-spa 0.2.0 setup and the former logseq static bild using logseq 0.9.8.

but I got a broken install and never back to work.

I used the instruction at https://github.com/logseq/publish-spa?tab=readme-ov-file#cli currently still published in branch main for Release 0.3.0 , edf2903

Prerequisite: yarn was upgraded globally to version 3.7 after the initial install for other purposes! ( I am not familiar with fully isolated installs using yarn!), the working install was issued under yarn v1.22.19.

Deleting the publish-spa git checkout and the containing static logseq build and starting from scratch ended up with the same resulting errors below.

I now used again:

  1. delete publish-spa git cloned folder
  2. recreate folder
  3. babashka and clojure installed! (bb -> Babashka v1.3.186 REPL, clj -> Clojure 1.11.1)
  4.  git clone https://github.com/logseq/publish-spa
     cd publish-spa && yarn install
    
  5. output
        ➤ YN0070: Migrating from Yarn 1; automatically enabling the compatibility node-modules linker 👍
        
        ➤ YN0000: ┌ Resolution step
        ➤ YN0000: └ Completed in 4s 382ms
        ➤ YN0000: ┌ Fetch step
        ➤ YN0013: │ wrap-ansi@npm:2.1.0 can't be found in the cache and will be fetched from the remote registry
        ➤ YN0013: │ wrappy@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
        ➤ YN0013: │ y18n@npm:4.0.3 can't be found in the cache and will be fetched from the remote registry
        ➤ YN0013: │ yargs-parser@npm:11.1.1 can't be found in the cache and will be fetched from the remote registry
        ➤ YN0013: │ yargs@npm:12.0.5 can't be found in the cache and will be fetched from the remote registry
        ➤ YN0000: └ Completed in 3s 366ms
        ➤ YN0000: ┌ Link step
        ➤ YN0000: └ Completed in 0s 227ms
        ➤ YN0000: Done in 7s 984ms
    
  6. command
    yarn global add $PWD
    
    Error:
    Usage Error: The 'yarn global' commands have been removed in 2.x - consider 
    using 'yarn dlx' or a third-party plugin instead
    
    $ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] [--require 
    #0] <scriptName> ...
    

No idea of the purpose of yarn global add $PWD and how to replace the functionality

@acsr
Copy link
Author

acsr commented Jan 26, 2024

When building the logseq static directory for 0.10.5 I used inside the publish-spa directory:

git clone https://github.com/logseq/logseq && cd logseq
git checkout 0.10.5
yarn install --immutable && yarn gulp:build && clojure -M:cljs release publishing

(I replaced the --frozen-lockfile option due to a hint from executing this option. The result was both the same:

YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code

➤ YN0000: ┌ Post-resolution validation
➤ YN0028: │ The lockfile would have been modified by this install, which is explicitly forbidden.
➤ YN0000: └ Completed
➤ YN0000: Failed with errors in 6s 635ms

same with:

git checkout 0.10.0

@logseq-cldwalker
Copy link
Contributor

Hi. I'm still using yarn 1.x but will let you know if I come across this when I upgrade. In the meantime, npm i -g also works to build the CLI. I've updated the docs to mention this

@logseq-cldwalker logseq-cldwalker added enhancement New feature or request documentation Improvements or additions to documentation labels Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants