Skip to content

Commit

Permalink
Fix findProvidesModule throwing error in while running start command (#…
Browse files Browse the repository at this point in the history
…171)

* use lstat insteaf of stat in findProvidesModule

* fix flow errors
  • Loading branch information
zamotany authored and grabbou committed Jun 14, 2017
1 parent 28a14ff commit 4016ce0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/utils/findProvidesModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function findProvidesModule(directories, opts = {}) {
const modulesMap = {};

const walk = dir => {
const stat = fs.statSync(dir);
const stat = fs.lstatSync(dir);

if (stat.isDirectory()) {
fs.readdirSync(dir).forEach(file => {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/resolveModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const resolver = require('resolve');
* We point to 'package.json', then remove it to receive a path to the directory itself
*/

module.exports = (root, name) =>
module.exports = (root: string, name: string) =>
resolver
.sync(`${name}/package.json`, { basedir: root })
.replace('/package.json', '');

0 comments on commit 4016ce0

Please sign in to comment.