Comments (3)
What exactly are the false errors that are being produced?
from dependency-lint.
When running dependency-lint on https://github.com/Originate/nitroglycerin with dependencies installed via ied, I get the error: mocha (unused)
Mocha is used in bin/tests, which looks like this:
#!/usr/bin/env bash
set -e
if [ "$#" == "0" ]; then
mocha --compilers ls:livescript spec
else
mocha --compilers ls:livescript "$@"
fi
A traditional install using NPM3 works correctly without dependency-lint errors.
IED changes the structure of the node_modules
folder to contain symlinks to folders in the .cas
directory. I assume dependency-lint is unable to follow these symlinks, hence it doesn't see the mocha
binary in node_modules/.cas/161be5bdeb496771eb9b35745050b622b5aefc58/package/bin
, and thinks mocha is unused.
Here is the structure of my node_modules
folder for reference:
drwxr-xr-x 23 kevin staff 782B Jul 11 12:04 .
drwxr-xr-x 18 kevin staff 612B Jul 11 12:04 ..
drwxr-xr-x 15 kevin staff 510B Jul 11 12:04 .bin
drwxr-xr-x 374 kevin staff 12K Jul 11 12:04 .cas
lrwxr-xr-x 1 kevin staff 53B Jul 11 12:04 chai -> .cas/4d02637b067fe958bdbfdd3a40ec56fef7373247/package
lrwxr-xr-x 1 kevin staff 53B Jul 11 12:04 coveralls -> .cas/f9ff01a1adbf22a129e35a8d62345a52a781b395/package
lrwxr-xr-x 1 kevin staff 53B Jul 11 12:04 dependency-lint -> .cas/83a1ec93a1b9d7427b68075a57029e3a0bb735da/package
lrwxr-xr-x 1 kevin staff 53B Jul 11 12:04 gulp -> .cas/571ce45928dd40af6514fc4011866016c13845b4/package
lrwxr-xr-x 1 kevin staff 53B Jul 11 12:04 gulp-concat -> .cas/585cfb115411f348773131140566b6a81c69cb91/package
lrwxr-xr-x 1 kevin staff 53B Jul 11 12:04 gulp-exit -> .cas/082313548683ad0ab05d430d7a563330d4e61370/package
lrwxr-xr-x 1 kevin staff 53B Jul 11 12:04 gulp-header -> .cas/e456f9390e5c86102d8f9b1fc49ca8f2b8902e0c/package
lrwxr-xr-x 1 kevin staff 53B Jul 11 12:04 gulp-livescript -> .cas/d2d7e068c22921c1a573d6683946018a65f9cdb0/package
lrwxr-xr-x 1 kevin staff 53B Jul 11 12:04 gulp-livescript-istanbul -> .cas/c50106ea1d8207519e44df66cc6edd23a0eca56f/package
lrwxr-xr-x 1 kevin staff 53B Jul 11 12:04 gulp-mocha -> .cas/1ce5eba4b94b40c7436afec3c4982c8eea894192/package
lrwxr-xr-x 1 kevin staff 53B Jul 11 12:04 gulp-uglify -> .cas/524788d87666d09f9d0c21fb2177f90039a658c9/package
lrwxr-xr-x 1 kevin staff 53B Jul 11 12:04 gulp-util -> .cas/78925c4b8f8b49005ac01a011c557e6218941cbb/package
lrwxr-xr-x 1 kevin staff 53B Jul 11 12:04 livescript -> .cas/4fe7121c41217e4608e334eb9cbe1762e63e5566/package
lrwxr-xr-x 1 kevin staff 53B Jul 11 12:04 mocha -> .cas/161be5bdeb496771eb9b35745050b622b5aefc58/package
lrwxr-xr-x 1 kevin staff 53B Jul 11 12:04 mocha-circleci-reporter -> .cas/9751273e919e8ea7c9e2d2128e18c374b0f4a817/package
lrwxr-xr-x 1 kevin staff 53B Jul 11 12:04 o-tools -> .cas/3cd428e19d88718f403e7f0925c7b4be74495215/package
lrwxr-xr-x 1 kevin staff 53B Jul 11 12:04 o-tools-livescript -> .cas/e07e67de0554a343e3f6f5c8953cefd3ee7d06ff/package
lrwxr-xr-x 1 kevin staff 53B Jul 11 12:04 sinon -> .cas/4e4ff4d84b20adee13138f36acb132ca1cd72c83/package
lrwxr-xr-x 1 kevin staff 53B Jul 11 12:04 sinon-chai -> .cas/432a9bbfd51a6fc00798f4d2526a829c060687ac/package
Running mocha itself works as expected.
Thanks!
from dependency-lint.
Alright, based on a short discussion with you I believe we need to update how we connect the executables with what module exposes them. Currently it is looking at the symlinks in the node_modules/.bin
. Instead should probably just read the bin
section of the each module's package.json
.
from dependency-lint.
Related Issues (20)
- Recognize modules used in circle.yml HOT 7
- Ignore hidden folders in node_modules
- Know about common transpilers HOT 5
- Incorrectly assumes missing "rc" dependency HOT 1
- Which Node and NPM versions does this library run on? HOT 4
- support es6
- Make --auto-correct only return an error code if uncorrected errors remain HOT 4
- --auto-correct should not delete dependencies listed in ignoreErrors.unused HOT 5
- plugin support HOT 3
- update reporter to only print errors / warnings
- *-sass in unused causes errors HOT 4
- Windows support HOT 4
- add option quite in CLI HOT 3
- Problem with install new version through `npm` HOT 1
- dependency-lint fails ONLY when run from npm run script HOT 3
- webpack and dependency-lint HOT 1
- support for Makefile HOT 2
- Always errors HOT 1
- Need to ignore @tsd/typescript after upgrading tsd to 0.16 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dependency-lint.