madskristensen / WebPackTaskRunner

A Visual Studio extension
Other
39 stars 16 forks source link

No ES6 support #15

Closed btraut closed 8 years ago

btraut commented 8 years ago

Webpack runs just fine when I run it via cmd from my project's dir. When I run WPTR, it's failing with several errors resembling the following:

    ERROR in ./~/css-loader!./~/postcss-loader!./~/less-loader!./less/SeriesPicker.less
    Module build failed: ReferenceError: Promise is not defined
        at LazyResult.async (C:\src\pacssoft\DICOMSharp\PSWebsite\node_modules\postcss\lib\lazy-result.js:157:31)
        at LazyResult.then (C:\src\pacssoft\DICOMSharp\PSWebsite\node_modules\postcss\lib\lazy-result.js:79:21)
        at Object.module.exports (C:\src\pacssoft\DICOMSharp\PSWebsite\node_modules\postcss-loader\index.js:47:32)

It appears as if the loaders are using ES6 promises which are not supported. The best I can tell looking into this error is that older versions of node didn't support promises, and I suspect WPTR is running an older version of node. Is this an issue with my system's PATH? Something within WPTR?

madskristensen commented 8 years ago

Task Runner Explorer in VS determines what version of node.js WPTR uses. See here how to change that so it uses the same version you have installed https://blogs.msdn.microsoft.com/webdev/2015/03/19/customize-external-web-tools-in-visual-studio-2015/

btraut commented 8 years ago

Thanks so much, @madskristensen. That did the trick!