You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 25, 2019. It is now read-only.
~\locator>npm test>[email protected] pretest ~\locator
> jshint --config ./node_modules/yui-lint/jshint.json ./lib/ tests/lib/
>[email protected]test~\locator
> mocha tests/lib/parseBundle.js --reporter spec
BundleLocator.parseBundle()
1) parseBundle()
0 passing (253 ms)
1 failing
1) BundleLocator.parseBundle() parseBundle():
TypeError: Cannot read property 'baseDirectory' of undefined
at n.<anonymous> (~\locator\lib\bundleLocator.js:497:23)
at new n (~\locator\node_modules\yui\promise\promise-min.js:1:2
28)
at Object.BundleLocator._processFileQueue (~\locator\lib\bundle
Locator.js:486:16)
at n.<anonymous> (~\locator\lib\bundleLocator.js:564:29)
at ~\locator\node_modules\yui\promise\promise-min.js:1:1450
at Object._onImmediate (~\locator\node_modules\yui\timers\timer
s-min.js:1:207)
at processImmediate [as _immediateCallback] (timers.js:330:15)
npm ERR! weird error 1
npm ERR! not ok code 0
Issue in the code
Looking at the code, the build fails in bundleLocator.js on line 346 - 348. If I am reading the code correctly, the assumption is that paths will follow the Unix layout, hence the '/' check.
Inserting another condition, '\\' === findPath.charAt(bundlePath.length), will fix the Cannot read property 'baseDirectory' of undefined error, but the tests will not fully pass where actual is 26 and expected is 31.
good catch! we have a similar situation a while ago in locator, and @drewfish managed to avoid the verification of the root. For locator the root is actually the dirname passed into locator, not need to look outside of that.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Example of stacktrace:
Issue in the code
Looking at the code, the build fails in
bundleLocator.js
on line 346 - 348. If I am reading the code correctly, the assumption is that paths will follow the Unix layout, hence the '/' check.Inserting another condition,
'\\' === findPath.charAt(bundlePath.length)
, will fix theCannot read property 'baseDirectory' of undefined
error, but the tests will not fully pass where actual is 26 and expected is 31.The text was updated successfully, but these errors were encountered: