Riot: Riot cannot be installed with pnpm

Created on 10 Jul 2018  Â·  3Comments  Â·  Source: riot/riot

  1. Describe your issue:

Riot can't be installed with pnpm instead of npm. pnpm is the default package manager in Glitch. This is the error we get:

ERROR  ENOENT: no such file or directory, lstat '/rbd/pnpm-volume/037c7ef6-118f-43ca-a11f-b1473a1167d2/node_modules/.registry.npmjs.org/riot/3.10.3/node_modules/riot/node_modules/riot-cli'

This is due to the fact that riot has a bin entry in package.json which assumes the directory layout of node_modules is the one generated by npm:

  "bin": {
    "riot": "node_modules/riot-cli/lib/index.js"
  }

Removing this entry should fix the issue, since the binary in riot-cli will still be installed.

  1. Can you reproduce the issue?

    1. Install pnpm: npm install -g pnpm
    2. Try to install riot with pnpm: mkdir -p ~/riot-pnpm && cd ~/riot-pnpm && pnpm install riot

    Expected: riot installs without issues
    Actual: riot fails to install

  2. How would you tag this issue?


    • [ ] Question

    • [X] Bug

    • [ ] Discussion

    • [ ] Feature request

    • [ ] Tip

    • [X] Enhancement

    • [ ] Performance


enhancement fixed

Most helpful comment

The new [email protected] adds the support for pnpm. Thanks for raising up this issue

All 3 comments

I think to fix this, you can just create a dedicated bin file inside riot with this content:

#!/usr/bin/env node
require('riot-cli')

The new [email protected] adds the support for pnpm. Thanks for raising up this issue

Thank you!!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

anonimusprogramus picture anonimusprogramus  Â·  3Comments

laznic picture laznic  Â·  3Comments

syuilo picture syuilo  Â·  3Comments

josephrocca picture josephrocca  Â·  3Comments

danawoodman picture danawoodman  Â·  3Comments