Skip to content
This repository has been archived by the owner on Jan 11, 2022. It is now read-only.

Error using [email protected] as a CLI command #56

Closed
tiabc opened this issue Dec 19, 2018 · 2 comments
Closed

Error using [email protected] as a CLI command #56

tiabc opened this issue Dec 19, 2018 · 2 comments

Comments

@tiabc
Copy link

tiabc commented Dec 19, 2018

We used to use [email protected] as a CLI command having installed it with npm i -g rlp. Now that we've updated to [email protected]:

$ sudo npm i -g rlp
/usr/bin/rlp -> /usr/lib/node_modules/rlp/bin/rlp
/usr/lib
└── [email protected]

we've faced an error:

$ rlp encode <whatever>
module.js:549
    throw err;
    ^

Error: Cannot find module './dist/index.js'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/lib/node_modules/rlp/bin/rlp:3:13)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

If we vim /usr/lib/node_modules/rlp/bin/rlp we'll see that there's ./dist/index.js included in the beginning which wasn't the case for [email protected]:

#!/usr/bin/env node

const rlp = require('./dist/index.js')
const command = process.argv[2]
var raw = process.argv[3]
...

I'm submitting this as a bug but maybe I'm supposed to install it differently or something to make it work?

@holgerd77
Copy link
Member

It's an error on our side - very sorry - we've messed up some path and didn't do a test on the CLI command on release. Will directly prepare a fix and release a version v2.3.0 fixing this.

@holgerd77
Copy link
Member

Fixed by #61.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants