Enable global npm installation
See original GitHub issueThe location of testrpc-sc
is hardcoded as:
const npm = './node_modules/.bin/testrpc-sc';
const yarn = './node_modules/ethereumjs-testrpc-sc/build/cli.node.js';
Can the output of npm bin
be used instead?
$ pwd
/home/ravi/repo/erc20/zeppelin-hitchhiker-guide
$ npm bin
/home/ravi/repo/erc20/node_modules/.bin
Here is the error I get:
$ $(npm bin)/solidity-coverage
Generating coverage environment
Instrumenting ./coverageEnv/contracts/ConvertLib.sol
Instrumenting ./coverageEnv/contracts/MetaCoin.sol
Skipping instrumentation of ./coverageEnv/contracts/Migrations.sol
Instrumenting ./coverageEnv/contracts/ProofOfExistence1.sol
testRpc stderr:
/bin/sh: ./node_modules/.bin/testrpc-sc: No such file or directory
Cleaning up...
testRpc errored after launching as a childprocess.
Exiting without generating coverage...
$
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Downloading and installing packages globally - npm Docs
To download and install packages globally, on the command line, run the following command: npm install -g <package_name>. If you get an EACCES...
Read more >How to npm install global not as root? - node.js - Stack Overflow
8 Answers 8 · 1. Configure npm · 2. Make sure ~/.local/bin exists and is in your PATH · 3. Install packages globally....
Read more >NPM - Node Package Manager - TutorialsTeacher
Install Package Globally. NPM can also install packages globally so that all the node.js application on that computer can import and use the...
Read more >guides/npm-global-without-sudo.md at main - GitHub
Install npm packages globally without sudo on macOS and Linux · 1. Create a directory for global packages · 2. Tell npm where...
Read more >A Note on Permissions | Introduction
You may receive an EACCES error when you try to install a package globally. This indicates that you do not have permission to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FYI, yarn does have a selective version resolution feature.
The npm doco says:
Because I want to use
solidity-coverage
at the command line, I installed it globally.So, following the docs,
./node_modules/.bin/testrpc-sc
won’t work.Could we assume that the user has setup their $PATH correctly and execute it without a leading path?
Renaming this issue and filing under
enhancement
.