Skip to content

Conversation

@jasonkarns
Copy link
Contributor

@jasonkarns jasonkarns commented Jun 2, 2017

Again, same issue as #56, there is no need to point directly at the node_modules bin because npm purposefully prepends $(npm bin) to PATH when running scripts.

(Which is in addition to the fact that ./node_modules/karma/bin/karma is the wrong path in the first place. It's brittle and reliant on karma always keeping that file in the same location and with the same name. Correct location for binaries is where npm symlinks them, as instructed by the bin property of package.json: ./node_modules/.bin/karma. But again, all this is unnecessary because npm has the feature specifically to avoid this.)

Again, same issue as optimizely#56, there is no need to point directly at the node_modules bin because npm purposefully prepends `$(npm bin)` to `PATH` when running scripts.

(Which is in addition to the fact that `./node_modules/karma/bin/karma` is the wrong path. It's brittle and reliant on karma always keeping that file in the same location with the same name. Correct location for binaries is where npm symlinks them, as instructed by the `bin` property of package.json: `./node_modules/.bin/karma`. But again, all is unnecessary because npm has the feature specifically to avoid this.)
@jasonkarns jasonkarns changed the title npm adds node_modules/.bin to PATH npm already adds node_modules/.bin to PATH Jun 2, 2017
@caitlinrubin-optimizely
Copy link
Contributor

Hi @jasonkarns we're reviewing that change and we're going to look into the travis test failures as well. Thanks!

@caitlinrubin-optimizely
Copy link
Contributor

@jasonkarns can you please pull our latest changes to master and re-push your fix?

@jasonkarns
Copy link
Contributor Author

done. still failing for unrelated reasons

@mikeproeng37
Copy link
Contributor

Closing this as it is no longer relevant.

@jasonkarns jasonkarns deleted the patch-2 branch June 16, 2020 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants