lasso-js/lasso

--watch --development flag bugs

csakis opened this issue · 1 comments

I followed the example in the main lasso documents to learn how to use lasso.
When I tried to build the project with
lasso style.less --main main.js --inject-into my-page.html --plugins lasso-less --watch --development
I get these errors:

Optimizing page "my-page"...
C:\Users\csaki\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\lasso-require\src\util\resolve.js:96
        var cache = lassoContext.cache.getSyncCache('resolveRequire');
                                      ^
TypeError: Cannot read property 'getSyncCache' of undefined
    at Object.resolveRequireCached (C:\Users\csaki\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\lasso-require\src\util\resolve.js:96:39)
    at Ctor.init [as doInit] (C:\Users\csaki\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\lasso-require\src\dep-require.js:240:46)
    at Ctor.init (C:\Users\csaki\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\lasso\lib\dependencies\Dependency.js:177:32)
    at walkDependency (C:\Users\csaki\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\lasso\lib\dependency-walker.js:91:20)
    at C:\Users\csaki\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\lasso\lib\dependency-walker.js:40:17
    at C:\Users\csaki\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\raptor-async\series.js:34:28
    at AsyncValue.<anonymous> (C:\Users\csaki\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\lasso\lib\dependency-walker.js:158:28)
    at notifyCallbacks (C:\Users\csaki\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\raptor-async\AsyncValue.js:76:35)
    at AsyncValue.resolve (C:\Users\csaki\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\raptor-async\AsyncValue.js:262:9)
    at handleKey (C:\Users\csaki\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\lasso\lib\dependencies\Dependency.js:475:27)

If I remove either the --development or the --watch flags, the process works fine.

Sorry for the late reply @csakis. If you re-install lasso-cli, this issue should be fixed. Thanks for reporting this issue.