{"action":"closed","issue":{"url":"https://api.github.com/repos/webpack-contrib/webpack-command/issues/11","repository_url":"https://api.github.com/repos/webpack-contrib/webpack-command","labels_url":"https://api.github.com/repos/webpack-contrib/webpack-command/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/webpack-contrib/webpack-command/issues/11/comments","events_url":"https://api.github.com/repos/webpack-contrib/webpack-command/issues/11/events","html_url":"https://github.com/webpack-contrib/webpack-command/issues/11","id":320155436,"number":11,"title":"Config errors when installed alongside postcss-loader","user":{"login":"billyjanitsch","id":1158733,"avatar_url":"https://avatars3.githubusercontent.com/u/1158733?v=4","gravatar_id":"","url":"https://api.github.com/users/billyjanitsch","html_url":"https://github.com/billyjanitsch","followers_url":"https://api.github.com/users/billyjanitsch/followers","following_url":"https://api.github.com/users/billyjanitsch/following{/other_user}","gists_url":"https://api.github.com/users/billyjanitsch/gists{/gist_id}","starred_url":"https://api.github.com/users/billyjanitsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/billyjanitsch/subscriptions","organizations_url":"https://api.github.com/users/billyjanitsch/orgs","repos_url":"https://api.github.com/users/billyjanitsch/repos","events_url":"https://api.github.com/users/billyjanitsch/events{/privacy}","received_events_url":"https://api.github.com/users/billyjanitsch/received_events","type":"User","site_admin":false},"labels":[{"id":848319786,"url":"https://api.github.com/repos/webpack-contrib/webpack-command/labels/c%C2%B3%20%E2%8B%85%20need%20more%20info","name":"c³ ⋅ need more info","color":"6A1B9A","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-05-04T05:10:55Z","updated_at":"2018-05-07T02:42:49Z","closed_at":"2018-05-07T02:42:49Z","author_association":"NONE","body":"<!--\r\n  Issues are so 🔥\r\n\r\n  If you remove or skip this template, you'll make the 🐼 sad and @ken_wheeler\r\n  will appear and pile-drive the close button from a great height while making\r\n  animal noises.\r\n\r\n  👉🏽 Need support, advice, or help? Don't open an issue.\r\n  Head to StackOverflow or https://gitter.im/webpack/webpack.\r\n-->\r\n\r\n* Operating System: 10.13.4\r\n* Node Version: 10.0.0\r\n* NPM Version: 6.0.0\r\n* webpack Version: 4.6.0\r\n* webpack-command Version: 0.1.1\r\n\r\n<!-- Please place an x (no spaces!) in all [ ] that apply -->\r\n\r\nThis issue is for a:\r\n\r\n- [x] **bug**\r\n- [ ] **feature** request\r\n- [ ] **modification** request\r\n\r\n### Code\r\n\r\nSee [this](https://github.com/billyjanitsch/foo) minimal reproducing repo.\r\n\r\n##### CLI Command\r\n\r\n```console\r\n  $ webpack\r\n```\r\n\r\n##### webpack.config.js\r\n\r\n```js\r\nmodule.exports = {\r\n  entry: './foo',\r\n  mode: 'development',\r\n}\r\n```\r\n\r\n### Expected Behavior\r\n\r\nThe presence of an unrelated dependency shouldn't affect webpack-command's ability to function.\r\n\r\n### Actual Behavior\r\n\r\nIn the [initial commit](https://github.com/billyjanitsch/foo/commit/864bd263ff8bc39c813883006e17840487731e1b), `npx webpack` works fine. However, after the [following commit](https://github.com/billyjanitsch/foo/commit/8b74d7d5bbea43a79ca433f2903a8a67f00f6e2a), which just adds postcss-loader as a dependency, `npx webpack` breaks, yielding the following error:\r\n\r\n```\r\nEntry module not found: Error: Can't resolve './src' in '/Users/billy/work/foo'\r\n  0:0  error  webpack-stylish: <please report unknown message format>\r\n\r\nconfiguration\r\n  0:0  warning  The 'mode' option has not been set, webpack will fallback to\r\n                'production' for this value. Set 'mode' option to 'development' or\r\n                'production' to enable defaults for each environment.\r\n```\r\n\r\nIt seems that the config is no longer being passed to webpack. Interestingly, if you add a `console.log` statement to webpack.config.js, it does run, so the config is still being _parsed_ but not passed.\r\n\r\nThis might be an issue with how webpack-command is loading its dependencies (or how one of its dependencies is loading its dependencies). Perhaps a dependency is somehow being loaded relative to the CWD rather than relative to the file requiring it, such that it's getting an unexpected, incompatible version. (Looking at the [package-lock.json diff](https://github.com/billyjanitsch/foo/commit/8b74d7d5bbea43a79ca433f2903a8a67f00f6e2a#diff-32607347f8126e6534ebc7ebaec4853d), parse-json and require-from-string seem like likely offenders.) Definitely a weird bug. 🤷‍♂️\r\n\r\n### How Do We Reproduce?\r\n\r\nClone [the repo](https://github.com/billyjanitsch/foo), and flip between the two commits, running `npm i && npx webpack` for each."}}
{"actor":{"display_login":"shellscape"}}