节点-v:v.4.4.5
npm -v:4.3.0
操作系统:Windows 10
重现问题的步骤:
- git clone git@github.com:microapps/MoonMail-UI.git
- cd moonmail-ui
- npm 安装
- npm 构建
- ...发生错误...
./src/styles/core.scss 中的错误
模块构建失败:ReferenceError: self is not definedat C:\dev\test-project\node_modules\style-loader\index.js!C:\dev\test-project\node_modules\css-loader\index.js?sourceMap&-minimize&modules&importLoaders=
1&localIdentName=[name] [local] [hash:base64:5]!C:\dev\test-project\node_modules\postcss-loader\index.js!C:\dev\test-project\node_modules\sass-loader\ index .js?sourceMap!C:\dev\test-project\src\styles\core.scss:99:30
at C:\dev\test-project\node_modules\style-loader\index.js!C:\dev\test-project\node_modules\css-loader\index.js?sourceMap&-minimize&modules&importLoaders=
1&localIdentName=[name] [local] [hash:base64:5]!C:\dev\test-project\node_modules\postcss-loader\index.js!C:\dev\test-project\node_modules\sass-loader\ index .js?sourceMap!C:\dev\test-project\src\styles\core.scss:94:47
at module.exports (C:\dev\test-project\node_modules\style-loader\index.js!C:\dev\test-project\node_modules\css-loader\index.js?sourceMap&-minimize&module
s&importLoaders=1&localIdentName=[name] [local] [hash:base64:5]!C:\dev\test-project\node_modules\postcss-loader\index.js!C:\dev\test-project\node_modules\s ass -loader\index.js?sourceMap!C:\dev\test-project\src\styles\core.scss:116:68)
at Object.<anonymous> (C:\dev\test-project\node_modules\style-loader\index.js!C:\dev\test-project\node_modules\css-loader\index.js?sourceMap&-minimize&mo
dules&importLoaders=1&localIdentName=[name] [local] [hash:base64:5]!C:\dev\test-project\node_modules\postcss-loader\index.js!C:\dev\test-project\node_modul es\sass -loader\index.js?sourceMap!C:\dev\test-project\src\styles\core.scss:400:36)
at __webpack_require__ (C:\dev\test-project\node_modules\style-loader\index.js!C:\dev\test-project\node_modules\css-loader\index.js?sourceMap&-minimize&m
odules&importLoaders=1&localIdentName=[name] [local] [hash:base64:5]!C:\dev\test-project\node_modules\postcss-loader\index.js!C:\dev\test-project\node_modu les\sass -loader\index.js?sourceMap!C:\dev\test-project\src\styles\core.scss:21:30)
at C:\dev\test-project\node_modules\style-loader\index.js!C:\dev\test-project\node_modules\css-loader\index.js?sourceMap&-minimize&modules&importLoaders=
1&localIdentName=[name] [local] [hash:base64:5]!C:\dev\test-project\node_modules\postcss-loader\index.js!C:\dev\test-project\node_modules\sass-loader\ index .js?sourceMap!C:\dev\test-project\src\styles\core.scss:65:18
at Object.<anonymous> (C:\dev\test-project\node_modules\style-loader\index.js!C:\dev\test-project\node_modules\css-loader\index.js?sourceMap&-minimize&mo
dules&importLoaders=1&localIdentName=[name] [local] [hash:base64:5]!C:\dev\test-project\node_modules\postcss-loader\index.js!C:\dev\test-project\node_modul es\sass -loader\index.js?sourceMap!C:\dev\test-project\src\styles\core.scss:68:10)
at Module._compile (module.js:409:26) at Object.loaderContext.exec (C:\dev\test-project\node_modules\webpack\lib\NormalModule.js:94:6) at Object.<anonymous> (C:\dev\test-project\node_modules\extract-text-webpack-plugin\loader.js:112:21) at Compiler.<anonymous> (C:\dev\test-project\node_modules\webpack\lib\Compiler.js:251:10) at C:\dev\test-project\node_modules\webpack\lib\Compiler.js:442:12 at next (C:\dev\test-project\node_modules\tapable\lib\Tapable.js:138:11) at Compiler.<anonymous> (C:\dev\test-project\node_modules\extract-text-webpack-plugin\loader.js:93:4) at next (C:\dev\test-project\node_modules\tapable\lib\Tapable.js:140:14) at Compiler.<anonymous> (C:\dev\test-project\node_modules\webpack\lib\CachePlugin.js:61:4) at Compiler.applyPluginsAsyncSeries (C:\dev\test-project\node_modules\tapable\lib\Tapable.js:142:13) at Compiler.<anonymous> (C:\dev\test-project\node_modules\webpack\lib\Compiler.js:439:9) at Compilation.applyPluginsAsyncSeries (C:\dev\test-project\node_modules\tapable\lib\Tapable.js:131:46) at Compilation.<anonymous> (C:\dev\test-project\node_modules\webpack\lib\Compilation.js:621:18) at Compilation.applyPluginsAsyncSeries (C:\dev\test-project\node_modules\tapable\lib\Tapable.js:131:46) at Compilation.<anonymous> (C:\dev\test-project\node_modules\webpack\lib\Compilation.js:612:10) at next (C:\dev\test-project\node_modules\tapable\lib\Tapable.js:138:11) at Compilation.<anonymous> (C:\dev\test-project\node_modules\webpack\lib\optimize\UglifyJsPlugin.js:144:4) at Compilation.applyPluginsAsyncSeries (C:\dev\test-project\node_modules\tapable\lib\Tapable.js:142:13) at Compilation.<anonymous> (C:\dev\test-project\node_modules\webpack\lib\Compilation.js:607:9) at Compilation.applyPluginsAsyncSeries (C:\dev\test-project\node_modules\tapable\lib\Tapable.js:131:46) at Compilation.<anonymous> (C:\dev\test-project\node_modules\webpack\lib\Compilation.js:603:8) at Compilation.applyPluginsAsyncSeries (C:\dev\test-project\node_modules\tapable\lib\Tapable.js:131:46) at Compilation.seal (C:\dev\test-project\node_modules\webpack\lib\Compilation.js:551:7)
我也无法npm start
或npm run start:prod