Using YARN
-
N nebulon marked this topic as a question on
-
Actually to take a step back, from your
package.json
it looks like there is nothingyarn
specific, couldn't you just usenpm
there instead? -
@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 thanyarn
is. -
@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?
-
@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'
-
@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'
-
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/4628Workaround (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#
-
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/4628Workaround (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#
-
G girish has marked this topic as solved on