nvm切换node版本

grafana 项目用的是node 6.x, 最近练习vue项目,切换成了 node 8.x 版本,原本的项目执行npm run watch的时候报错,node 环境变化,依赖node 6.x

报错信息很明确,也提示了怎么解决。为了省事,就直接切换node版本了。

使用nvm切换 node为低版本,重新执行npm run watch,不报错了。

1. grafana 高版本node执行npm run watch,报错

F:\g\src\github.com\grafana\grafana>npm run watch

> grafana@4.6.1 watch F:\g\src\github.com\grafana\grafana
> webpack --progress --colors --watch --config scripts/webpack/webpack.dev.js

 10% building modules 1/1 modules 0 active
Webpack is watching the files…

 10% building modules 1/2 modules 1 active ...m\grafana\grafana\public\app\index.ts
[at-loader] Using typescript@2.5.3 from typescript and "tsconfig.json" from F:\g\src\github.com\grafana\grafana/tsconfig.json (in a forked process).

 68% building modules 1609/1647 modules 38 active ...les\rxjs\observable\FromObservable.js[BABEL] Note: The code generator has deoptimised the styling of "F:/g/src/github.com/grafana/grafana/public/app/plugins/panel/baocloud-echarts-mapline3d-panel/echarts-gl.js" as it exceeds the max of "500KB".
 68% building modules 1610/1647 modules 37 active ...les\rxjs\observable\FromObservable.js[BABEL] Note: The code generator has deoptimised the styling of "F:/g/src/github.com/grafana/grafana/public/vendor/jsoneditor/jsoneditor.min.js" as it exceeds the max of "500KB".
 94% asset optimization
[at-loader] Checking started in a separate process...
 95% emitting
[at-loader] Ok, 1.895 sec.
Hash: 193875858327033c2373
Version: webpack 3.6.0
Time: 157210ms
                           Asset     Size  Chunks                    Chunk Names
       0.b56eee66578542f9e179.js  21.9 MB       0  [emitted]  [big]
       1.fae56755840111a96ccc.js  60.6 kB       1  [emitted]
       2.df28385929078b9d96e7.js  58.2 kB       2  [emitted]
       3.4ba1cb2adacc4120f5fb.js  37.9 kB       3  [emitted]
  vendor.04134904d7e5d82d074f.js  20.3 MB       4  [emitted]  [big]  vendor
     app.c00d807f74f29ff36816.js  6.21 MB       5  [emitted]  [big]  app
   light.ba94fc0e9f3d134bcdc9.js  7.49 kB       6  [emitted]         light
    dark.1938ee336bc4389d1b64.js  7.49 kB       7  [emitted]         dark
manifest.564c962a3f770d8aff99.js  6.02 kB       8  [emitted]         manifest
             ..\views\index.html  11.2 kB          [emitted]
  [36] ./public/app/core/config.ts 654 bytes {5} [built]
  [64] (webpack)/buildin/global.js 509 bytes {4} [built]
 [189] (webpack)/buildin/amd-define.js 88 bytes {4} [built]
 [477] ./public/app/core/core.ts 2.61 kB {5} [built]
 [487] (webpack)/buildin/amd-options.js 82 bytes {4} [built]
 [491] ./public/app/index.ts 39 bytes {5} [built]
 [492] ./public/app/app.ts 5.18 kB {5} [built]
 [717] ./public/vendor/bootstrap/bootstrap.js 42.2 kB {5} [built]
 [718] ./public/vendor/angular-ui/ui-bootstrap-tpls.js 45.8 kB {5} [built]
 [719] ./public/vendor/angular-other/angular-strap.js 6.16 kB {5} [built]
 [720] ./node_modules/moment/locale ^\.\/.*$ 2.79 kB {4} [optional] [built]
[1353] ./public/sass/grafana.dark.scss 6.32 kB {7} [built] [failed] [1 error]
[1354] ./public/sass/grafana.light.scss 6.32 kB {6} [built] [failed] [1 error]
[1355] multi jquery angular angular-bindonce angular-mocks angular-native-dragdrop angular-route angular-sanitize babel-polyfill brace clipboard echarts eventemitter3 file-saver lodash moment mousetrap ngreact react react-dom remarkable tether tether-drop tinycolor2 292 bytes {4} [built]
[1360] ./public/app/features/all.js 240 bytes {0} [built]
    + 2180 hidden modules

ERROR in ./public/sass/grafana.dark.scss
Module build failed: Error: Missing binding F:\g\src\github.com\grafana\grafana\node_modules\node-sass\vendor\win32-x64-57\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 8.x

Found bindings for the following environments:
  - Windows 64-bit with Node.js 6.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass --force` to build the binding for your current environment.
    at module.exports (F:\g\src\github.com\grafana\grafana\node_modules\node-sass\lib\binding.js:15:13)
    at Object.<anonymous> (F:\g\src\github.com\grafana\grafana\node_modules\node-sass\lib\index.js:14:35)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (F:\g\src\github.com\grafana\grafana\node_modules\sass-loader\lib\loader.js:3:14)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at loadLoader (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\loadLoader.js:13:17)
    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:169:2)    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
    at F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:173:18
    at loadLoader (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\loadLoader.js:36:3)
    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:169:2)    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
    at F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:173:18
    at loadLoader (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\loadLoader.js:36:3)
    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:169:2)    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
    at F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:185:6
    at runSyncOrAsync (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:124:12)

ERROR in ./public/sass/grafana.light.scss
Module build failed: Error: Missing binding F:\g\src\github.com\grafana\grafana\node_modules\node-sass\vendor\win32-x64-57\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 8.x

Found bindings for the following environments:
  - Windows 64-bit with Node.js 6.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass --force` to build the binding for your current environment.
    at module.exports (F:\g\src\github.com\grafana\grafana\node_modules\node-sass\lib\binding.js:15:13)
    at Object.<anonymous> (F:\g\src\github.com\grafana\grafana\node_modules\node-sass\lib\index.js:14:35)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (F:\g\src\github.com\grafana\grafana\node_modules\sass-loader\lib\loader.js:3:14)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at loadLoader (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\loadLoader.js:13:17)
    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:169:2)    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
    at F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:173:18
    at loadLoader (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\loadLoader.js:36:3)
    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:169:2)    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
    at F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:173:18
    at loadLoader (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\loadLoader.js:36:3)
    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:169:2)    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
    at F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:185:6
    at runSyncOrAsync (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:124:12)

ERROR in ./public/sass/grafana.dark.scss
Module build failed: ModuleBuildError: Module build failed: Error: Missing binding F:\g\src\github.com\grafana\grafana\node_modules\node-sass\vendor\win32-x64-57\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 8.x

Found bindings for the following environments:
  - Windows 64-bit with Node.js 6.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass --force` to build the binding for your current environment.
    at module.exports (F:\g\src\github.com\grafana\grafana\node_modules\node-sass\lib\binding.js:15:13)
    at Object.<anonymous> (F:\g\src\github.com\grafana\grafana\node_modules\node-sass\lib\index.js:14:35)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (F:\g\src\github.com\grafana\grafana\node_modules\sass-loader\lib\loader.js:3:14)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at loadLoader (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\loadLoader.js:13:17)
    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:169:2)    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
    at F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:173:18
    at loadLoader (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\loadLoader.js:36:3)
    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:169:2)    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
    at F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:173:18
    at loadLoader (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\loadLoader.js:36:3)
    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:169:2)    at runLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:362:2)
    at NormalModule.doBuild (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\NormalModule.js:182:3)
    at NormalModule.build (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\NormalModule.js:275:15)
    at runLoaders (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\NormalModule.js:195:19)
    at F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:364:11
    at F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:170:18
    at loadLoader (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\loadLoader.js:27:11)
    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:169:2)    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
    at F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:173:18
    at loadLoader (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\loadLoader.js:36:3)
    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:169:2)    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
    at F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:173:18
    at loadLoader (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\loadLoader.js:36:3)
    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:169:2)    at runLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:362:2)
    at NormalModule.doBuild (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\NormalModule.js:182:3)
    at NormalModule.build (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\NormalModule.js:275:15)
    at Compilation.buildModule (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\Compilation.js:149:10)
    at moduleFactory.create (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\Compilation.js:447:10)
    at factory (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\NormalModuleFactory.js:241:5)
    at applyPluginsAsyncWaterfall (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\NormalModuleFactory.js:94:13)
    at F:\g\src\github.com\grafana\grafana\node_modules\tapable\lib\Tapable.js:268:11
    at NormalModuleFactory.params.normalModuleFactory.plugin (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\CompatibilityPlugin.js:52:5)
    at NormalModuleFactory.applyPluginsAsyncWaterfall (F:\g\src\github.com\grafana\grafana\node_modules\tapable\lib\Tapable.js:272:13)
    at resolver (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\NormalModuleFactory.js:69:10)
    at process.nextTick (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\NormalModuleFactory.js:194:7)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

ERROR in ./public/sass/grafana.light.scss
Module build failed: ModuleBuildError: Module build failed: Error: Missing binding F:\g\src\github.com\grafana\grafana\node_modules\node-sass\vendor\win32-x64-57\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 8.x

Found bindings for the following environments:
  - Windows 64-bit with Node.js 6.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass --force` to build the binding for your current environment.
    at module.exports (F:\g\src\github.com\grafana\grafana\node_modules\node-sass\lib\binding.js:15:13)
    at Object.<anonymous> (F:\g\src\github.com\grafana\grafana\node_modules\node-sass\lib\index.js:14:35)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (F:\g\src\github.com\grafana\grafana\node_modules\sass-loader\lib\loader.js:3:14)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at loadLoader (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\loadLoader.js:13:17)
    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:169:2)    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
    at F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:173:18
    at loadLoader (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\loadLoader.js:36:3)
    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:169:2)    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
    at F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:173:18
    at loadLoader (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\loadLoader.js:36:3)
    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:169:2)    at runLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:362:2)
    at NormalModule.doBuild (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\NormalModule.js:182:3)
    at NormalModule.build (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\NormalModule.js:275:15)
    at runLoaders (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\NormalModule.js:195:19)
    at F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:364:11
    at F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:170:18
    at loadLoader (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\loadLoader.js:27:11)
    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:169:2)    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
    at F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:173:18
    at loadLoader (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\loadLoader.js:36:3)
    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:169:2)    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
    at F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:173:18
    at loadLoader (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\loadLoader.js:36:3)
    at iteratePitchingLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:169:2)    at runLoaders (F:\g\src\github.com\grafana\grafana\node_modules\loader-runner\lib\LoaderRunner.js:362:2)
    at NormalModule.doBuild (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\NormalModule.js:182:3)
    at NormalModule.build (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\NormalModule.js:275:15)
    at Compilation.buildModule (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\Compilation.js:149:10)
    at moduleFactory.create (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\Compilation.js:447:10)
    at factory (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\NormalModuleFactory.js:241:5)
    at applyPluginsAsyncWaterfall (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\NormalModuleFactory.js:94:13)
    at F:\g\src\github.com\grafana\grafana\node_modules\tapable\lib\Tapable.js:268:11
    at NormalModuleFactory.params.normalModuleFactory.plugin (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\CompatibilityPlugin.js:52:5)
    at NormalModuleFactory.applyPluginsAsyncWaterfall (F:\g\src\github.com\grafana\grafana\node_modules\tapable\lib\Tapable.js:272:13)
    at resolver (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\NormalModuleFactory.js:69:10)
    at process.nextTick (F:\g\src\github.com\grafana\grafana\node_modules\webpack\lib\NormalModuleFactory.js:194:7)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)
终止批处理操作吗(Y/N)? y

2.从报错信息中看提示

QQ截图20190626201947.png

3. nvm 切换 node 版本

C:\Users\ZMH>node -v
v8.10.0

C:\Users\ZMH>nvm ls

    12.1.0
  * 8.10.0 (Currently using 64-bit executable)
    6.10.2

C:\Users\ZMH>nvm use 6.10.2
Now using node v6.10.2 (64-bit)

C:\Users\ZMH>

4.切换低版本node,执行npm run watch成功

F:\g\src\github.com\grafana\grafana>npm run watch

> grafana@4.6.1 watch F:\g\src\github.com\grafana\grafana
> webpack --progress --colors --watch --config scripts/webpack/webpack.dev.js

 10% building modules 1/1 modules 0 active
Webpack is watching the files…

 10% building modules 1/4 modules 3 active ...rafana\public\sass\grafana.light.scss
[at-loader] Using typescript@2.5.3 from typescript and "tsconfig.json" from F:\g\src\github.com\grafana\grafana/tsconfig.json (in a forked process).

 68% building modules 1615/1647 modules 32 active ...ana-baocloud-datasource\serviceurl.js[BABEL] Note: The code generator has deoptimised the styling of "F:/g/src/github.com/grafana/grafana/public/app/plugins/panel/baocloud-echarts-mapline3d-panel/echarts-gl.js" as it exceeds the max of "500KB".
 68% building modules 1616/1647 modules 31 active ...ana-baocloud-datasource\serviceurl.js[BABEL] Note: The code generator has deoptimised the styling of "F:/g/src/github.com/grafana/grafana/public/vendor/jsoneditor/jsoneditor.min.js" as it exceeds the max of "500KB".
 94% asset optimization
[at-loader] Checking started in a separate process...
 95% emitting
[at-loader] Ok, 1.847 sec.
Hash: 8775282c5c62b9dd46fa
Version: webpack 3.6.0
Time: 117483ms
                           Asset       Size  Chunks                    Chunk Names
   light.c66837308772622dabc0.js  702 bytes       6  [emitted]         light
       0.b56eee66578542f9e179.js    21.9 MB       0  [emitted]  [big]
       2.df28385929078b9d96e7.js    58.2 kB       2  [emitted]
       3.4ba1cb2adacc4120f5fb.js    37.9 kB       3  [emitted]
  vendor.04134904d7e5d82d074f.js    20.3 MB       4  [emitted]  [big]  vendor
     app.c00d807f74f29ff36816.js    6.21 MB       5  [emitted]  [big]  app
       1.fae56755840111a96ccc.js    60.6 kB       1  [emitted]
    dark.0c24ea23de01ad0bcb9e.js  702 bytes       7  [emitted]         dark
manifest.f950afb206d257506de7.js    6.02 kB       8  [emitted]         manifest
                grafana.dark.css     322 kB       7  [emitted]  [big]  dark
               grafana.light.css     321 kB       6  [emitted]  [big]  light
             ..\views\index.html    11.2 kB          [emitted]
  [64] (webpack)/buildin/global.js 509 bytes {4} [built]
 [189] (webpack)/buildin/amd-define.js 88 bytes {4} [built]
 [218] (webpack)/buildin/module.js 517 bytes {4} [built]
 [477] ./public/app/core/core.ts 2.61 kB {5} [built]
 [491] ./public/app/index.ts 39 bytes {5} [built]
 [492] ./public/app/app.ts 5.18 kB {5} [built]
[1353] ./public/sass/grafana.dark.scss 41 bytes {7} [built]
[1354] ./public/sass/grafana.light.scss 41 bytes {6} [built]
[1355] multi jquery angular angular-bindonce angular-mocks angular-native-dragdrop angular-route angular-sanitize babel-polyfill brace clipboard echarts eventemitter3 file-saver lodash moment mousetrap ngreact react react-dom remarkable tether tether-drop tinycolor2 292 bytes {4} [built]
[1360] ./public/app/features/all.js 240 bytes {0} [built]
[2196] ./node_modules/css-loader?{"importLoaders":2,"url":false,"sourceMap":true,"minimize":false}!./node_modules/postcss-loader/lib?{"sourceMap":true,"config":{"path":"F://g//src//github.com//grafana//grafana//scripts//webpack/postcss.config.js"}}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":true}!./public/vendor/css/timepicker.css 27.6 kB [built]
[2197] ./node_modules/css-loader?{"importLoaders":2,"url":false,"sourceMap":true,"minimize":false}!./node_modules/postcss-loader/lib?{"sourceMap":true,"config":{"path":"F://g//src//github.com//grafana//grafana//scripts//webpack/postcss.config.js"}}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":true}!./public/vendor/css/spectrum.css 43.8 kB [built]
[2198] ./node_modules/css-loader?{"importLoaders":2,"url":false,"sourceMap":true,"minimize":false}!./node_modules/postcss-loader/lib?{"sourceMap":true,"config":{"path":"F://g//src//github.com//grafana//grafana//scripts//webpack/postcss.config.js"}}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":true}!./public/vendor/jsoneditor/jsoneditor.grafana.css 59.4 kB [built]
[2199] ./node_modules/css-loader?{"importLoaders":2,"url":false,"sourceMap":true,"minimize":false}!./node_modules/postcss-loader/lib?{"sourceMap":true,"config":{"path":"F://g//src//github.com//grafana//grafana//scripts//webpack/postcss.config.js"}}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":true}!./public/sass/baocloud/panel_baocloudclock.css 887 bytes [built]
[2200] ./node_modules/css-loader?{"importLoaders":2,"url":false,"sourceMap":true,"minimize":false}!./node_modules/postcss-loader/lib?{"sourceMap":true,"config":{"path":"F://g//src//github.com//grafana//grafana//scripts//webpack/postcss.config.js"}}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":true}!./public/sass/baocloud/customer-query-editor.css 581 bytes [built]
    + 2186 hidden modules

推荐阅读更多精彩内容