question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Config filename conflicts with npm, please support alternate config names

See original GitHub issue

If a project has a browserslist config file, npm will fail to install the browserslist package. The config file is mistaken for a local node.js package, and npm fails with an npm ERR! not a package error.

Steps to reproduce

  1. $ mkdir -p /tmp/bl && cd $_
  2. $ echo last 4 versions > browserslist
  3. $ npm install browserslist
npm ERR! not a package /private/tmp/bl/browserslist
npm ERR! addLocal Could not install /private/tmp/bl/browserslist
[...]
  • naive expected result: install the browserslist package from npm
    naive becase everything’s actually working correctly, just that the filename conflicts

  • actual result: error, package does not install

Any chance the project could support an alternate config file name like .browserslist, browserslist.config or browserlistrc? My preference would be a dotfile, which would fit in nicely with the ever-growing collection of like-named config files from other tools.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
aicommented, Jan 7, 2017

I think we could add .browserslist config name in next major release and promote only it in docs (but still support browserslist config with warnings).

1reaction
aicommented, Jan 10, 2017

@brokenmass I am not big fan of rc postfix. It is longer and less readable. But I could rethink about it if there is some standard about names.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix the upstream dependency conflict installing NPM packages
It looks like it's a problem with peer dependencies in the latest version of npm (v7) which is still a beta version. Try...
Read more >
config | npm Docs
Config values are case-insensitive, so NPM_CONFIG_FOO=bar will work the same. However, please note that inside scripts npm will set its own environment ...
Read more >
package.json - npm Docs
Description. This document is all you need to know about what's required in your package.json file. It must be actual JSON, not just...
Read more >
simple-git - npm
Simple Git. NPM version. A lightweight interface for running git commands in any node.js application. Version 3 - Out Now.
Read more >
config - npm Docs
Config values are case-insensitive, so NPM_CONFIG_FOO=bar will work the same. However, please note that inside scripts npm will set its own environment ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found