[Pkg-javascript-devel] Bug#977781: Bug#977781: yarnpkg: fails to download modules

Pirate Praveen praveen at onenetbeyond.org
Sun Dec 20 20:16:43 GMT 2020



On Mon, Dec 21, 2020 at 1:37 am, Pirate Praveen 
<praveen at onenetbeyond.org> wrote:
> On Mon, 21 Dec 2020 00:39:35 +0530 Pirate Praveen 
> <praveen at onenetbeyond.org> wrote:
> > Since yarnpkg add command did not return an error, the autpkgtest 
> was
> > succeeding even though it did not add any modules to node_modules
> > directory.
> 
> Though this is sufficient to install yarn 2 (berry).
> 
> $ yarnpkg set version berry
> Resolving berry to a url...
> Downloading 
> https://github.com/yarnpkg/berry/raw/master/packages/berry-cli/bin/berry.js..
> Saving it into /tmp/project1/.yarn/releases/yarn-berry.cjs...
> Updating /tmp/project1/.yarnrc.yml...
> Done!
> 
> $ yarnpkg init
> {
>  name: 'project1'
> }
> pravi at mahishi:/tmp/project1$ ls
> package.json README.md yarn.lock
> pravi at mahishi:/tmp/project1$ yarnpkg add d3-color
> ➤ YN0000: ┌ Resolution step
> ➤ YN0000: └ Completed
> ➤ YN0000: ┌ Fetch step
> ➤ YN0013: │ d3-color at npm:2.0.0 can't be found in the cache and 
> will be fetched from
> ➤ YN0000: └ Completed in 0s 735ms
> ➤ YN0000: ┌ Link step
> ➤ YN0000: └ Completed
> ➤ YN0000: Done in 0s 797ms
> $ ls .yarn/cache/
> d3-color-npm-2.0.0-e7f04a5d87-637e111598.zip
> gitignore

We need to create ~/.yarnrc.yml to create node_modules directory.

$ cat ~/.yarnrc.yml
nodeLinker: "node-modules"

$ yarnpkg install
\➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed
➤ YN0000: Done in 0s 203ms
pravi at mahishi:/tmp/project1$ ls
node_modules  package.json  README.md  yarn.lock
pravi at mahishi:/tmp/project1$ ls node_modules/
d3-color
pravi at mahishi:/tmp/project1$ ls node_modules/d3-color/
dist  LICENSE  package.json  README.md  src



More information about the Pkg-javascript-devel mailing list