Closed kaba2 closed 6 years ago
const modulePath = require.resolve('ua-parser-js').match(/node_modules\/.*$/)[0];
I would assume that the path separator /
(or \/
in the regex) has to be \
(or \\
in the regex) for Windows.
Can you try running this with:
const modulePath = require.resolve('ua-parser-js').match(/node_modules(\/|\\).*$/)[0];
That solves the problem, thanks.
Would be cool, if you could submit a PR! 😊
Done.
The update from 6.1 to 7.1 produced the following crash in our program on Windows 10, right at the start of 'yarn':
The offending line index.js which produces 'Cannot read property '0' of null' is:
Any ideas?