Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. LAMP
  3. Using YARN

Using YARN

Scheduled Pinned Locked Moved Solved LAMP
18 Posts 5 Posters 4.6k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • nebulonN Offline
    nebulonN Offline
    nebulon
    Staff
    wrote on last edited by
    #6

    Actually to take a step back, from your package.json it looks like there is nothing yarn specific, couldn't you just use npm there instead?

    FoksVHoxF 1 Reply Last reply
    0
    • nebulonN nebulon marked this topic as a question on
    • nebulonN nebulon

      Actually to take a step back, from your package.json it looks like there is nothing yarn specific, couldn't you just use npm there instead?

      FoksVHoxF Offline
      FoksVHoxF Offline
      FoksVHox
      wrote on last edited by
      #7

      @nebulon said in Using YARN:

      Actually to take a step back, from your package.json it looks like there is nothing yarn specific, couldn't you just use npm there instead?

      Well I could, however, npm is often way slower than yarn is.

      nebulonN 1 Reply Last reply
      0
      • FoksVHoxF FoksVHox

        @nebulon said in Using YARN:

        Actually to take a step back, from your package.json it looks like there is nothing yarn specific, couldn't you just use npm there instead?

        Well I could, however, npm is often way slower than yarn is.

        nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote on last edited by
        #8

        @FoksVHox actually I have mixed experience there since some npm releases. But either way would a few seconds make much difference in your case compared to it working?

        FoksVHoxF 1 Reply Last reply
        0
        • nebulonN nebulon

          @FoksVHox actually I have mixed experience there since some npm releases. But either way would a few seconds make much difference in your case compared to it working?

          FoksVHoxF Offline
          FoksVHoxF Offline
          FoksVHox
          wrote on last edited by
          #9

          @nebulon I've tried to use npm but it seems that it won't work either.

          nebulonN 1 Reply Last reply
          0
          • FoksVHoxF FoksVHox

            @nebulon I've tried to use npm but it seems that it won't work either.

            nebulonN Offline
            nebulonN Offline
            nebulon
            Staff
            wrote on last edited by
            #10

            @FoksVHox is there any other error with npm?

            FoksVHoxF 1 Reply Last reply
            0
            • nebulonN nebulon

              @FoksVHox is there any other error with npm?

              FoksVHoxF Offline
              FoksVHoxF Offline
              FoksVHox
              wrote on last edited by
              #11

              @nebulon There is:

              EACCES: permission denied, open '/app/data/lectero/public/build/assets/app.22fa980f.js'
              error during build:
              Error: EACCES: permission denied, open '/app/data/lectero/public/build/assets/app.22fa980f.js'
              
              nebulonN girishG 2 Replies Last reply
              0
              • FoksVHoxF FoksVHox

                @nebulon There is:

                EACCES: permission denied, open '/app/data/lectero/public/build/assets/app.22fa980f.js'
                error during build:
                Error: EACCES: permission denied, open '/app/data/lectero/public/build/assets/app.22fa980f.js'
                
                nebulonN Offline
                nebulonN Offline
                nebulon
                Staff
                wrote on last edited by
                #12

                @FoksVHox seems like a permission issue then. Make sure that the user, with whom you are running npm, has write access to those folders.

                1 Reply Last reply
                0
                • FoksVHoxF FoksVHox

                  @nebulon There is:

                  EACCES: permission denied, open '/app/data/lectero/public/build/assets/app.22fa980f.js'
                  error during build:
                  Error: EACCES: permission denied, open '/app/data/lectero/public/build/assets/app.22fa980f.js'
                  
                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #13

                  @FoksVHox If you are running as www-data user, you have to chown -R www-data:www-data /app/data/public

                  1 Reply Last reply
                  0
                  • girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by
                    #14

                    Was just investigating this a bit. What I found is that yarn wants to write as root user into /usr/local/share/.yarnrc. This is reported upstream as bug https://github.com/yarnpkg/yarn/issues/4628

                    Workaround (you can put this in /app/data/.bashrc if you like):

                    export YARN_DISABLE_SELF_UPDATE_CHECK="true"
                    

                    After this, I am able to install easily:

                    root@38e05e7c-8aee-426e-85ef-a577d080c39c:/app/data/public# yarn add safetydance
                    yarn add v1.22.17
                    warning package.json: No license field
                    warning Skipping preferred cache folder "/usr/local/share/.cache/yarn" because it is not writable.
                    warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-0".
                    warning No license field
                    [1/4] Resolving packages...
                    [2/4] Fetching packages...
                    [3/4] Linking dependencies...
                    [4/4] Building fresh packages...
                    
                    success Saved lockfile.
                    warning No license field
                    success Saved 1 new dependency.
                    info Direct dependencies
                    └─ safetydance@2.2.0
                    info All dependencies
                    └─ safetydance@2.2.0
                    Done in 1.15s.
                    root@38e05e7c-8aee-426e-85ef-a577d080c39c:/app/data/public#
                    
                    FoksVHoxF 1 Reply Last reply
                    1
                    • girishG girish

                      Was just investigating this a bit. What I found is that yarn wants to write as root user into /usr/local/share/.yarnrc. This is reported upstream as bug https://github.com/yarnpkg/yarn/issues/4628

                      Workaround (you can put this in /app/data/.bashrc if you like):

                      export YARN_DISABLE_SELF_UPDATE_CHECK="true"
                      

                      After this, I am able to install easily:

                      root@38e05e7c-8aee-426e-85ef-a577d080c39c:/app/data/public# yarn add safetydance
                      yarn add v1.22.17
                      warning package.json: No license field
                      warning Skipping preferred cache folder "/usr/local/share/.cache/yarn" because it is not writable.
                      warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-0".
                      warning No license field
                      [1/4] Resolving packages...
                      [2/4] Fetching packages...
                      [3/4] Linking dependencies...
                      [4/4] Building fresh packages...
                      
                      success Saved lockfile.
                      warning No license field
                      success Saved 1 new dependency.
                      info Direct dependencies
                      └─ safetydance@2.2.0
                      info All dependencies
                      └─ safetydance@2.2.0
                      Done in 1.15s.
                      root@38e05e7c-8aee-426e-85ef-a577d080c39c:/app/data/public#
                      
                      FoksVHoxF Offline
                      FoksVHoxF Offline
                      FoksVHox
                      wrote on last edited by
                      #15

                      @girish Will you update the thread once the issue has been resolved?

                      girishG 1 Reply Last reply
                      0
                      • FoksVHoxF FoksVHox

                        @girish Will you update the thread once the issue has been resolved?

                        girishG Offline
                        girishG Offline
                        girish
                        Staff
                        wrote on last edited by
                        #16

                        @FoksVHox Will do. I am subscribed to that issue, but it's open for 5 years now, so I have no hope 🙂

                        1 Reply Last reply
                        0
                        • girishG girish has marked this topic as solved on
                        • C Offline
                          C Offline
                          charlesnw
                          wrote last edited by
                          #17

                          Is yarn no longer included?

                          root@ab0364d2-83f6-46cd-96c5-f9c329d24af7:/app/data/public# yarn --version
                          bash: yarn: command not found
                          root@ab0364d2-83f6-46cd-96c5-f9c329d24af7:/app/data/public#

                          1 Reply Last reply
                          0
                          • jamesJ Offline
                            jamesJ Offline
                            james
                            Staff
                            wrote last edited by
                            #18

                            Hello @charlesnw
                            With this commit: https://git.cloudron.io/platform/docker-base-image/-/commit/2e4f7fd5fde83652567dd0a00a695f523bef98d1 yarn was removed from the docker base image.
                            So yes, yarn is no longer included in any app by default.

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Bookmarks
                            • Search