nvm切換node版本

grafana 項(xiàng)目用的是node 6.x, 最近練習(xí)vue項(xiàng)目,切換成了 node 8.x 版本破托,原本的項(xiàng)目執(zhí)行npm run watch的時(shí)候報(bào)錯(cuò)查坪,node 環(huán)境變化寸宏,依賴node 6.x

報(bào)錯(cuò)信息很明確偿曙,也提示了怎么解決氮凝。為了省事,就直接切換node版本了望忆。

使用nvm切換 node為低版本罩阵,重新執(zhí)行npm run watch,不報(bào)錯(cuò)了启摄。

1. grafana 高版本node執(zhí)行npm run watch稿壁,報(bào)錯(cuò)

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.從報(bào)錯(cuò)信息中看提示

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,執(zhí)行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
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末歉备,一起剝皮案震驚了整個(gè)濱河市傅是,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌威创,老刑警劉巖落午,帶你破解...
    沈念sama閱讀 206,126評(píng)論 6 481
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場(chǎng)離奇詭異肚豺,居然都是意外死亡溃斋,警方通過查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,254評(píng)論 2 382
  • 文/潘曉璐 我一進(jìn)店門吸申,熙熙樓的掌柜王于貴愁眉苦臉地迎上來梗劫,“玉大人,你說我怎么就攤上這事截碴∈崆龋” “怎么了?”我有些...
    開封第一講書人閱讀 152,445評(píng)論 0 341
  • 文/不壞的土叔 我叫張陵日丹,是天一觀的道長(zhǎng)走哺。 經(jīng)常有香客問我,道長(zhǎng)哲虾,這世上最難降的妖魔是什么丙躏? 我笑而不...
    開封第一講書人閱讀 55,185評(píng)論 1 278
  • 正文 為了忘掉前任择示,我火速辦了婚禮,結(jié)果婚禮上晒旅,老公的妹妹穿的比我還像新娘栅盲。我一直安慰自己,他們只是感情好废恋,可當(dāng)我...
    茶點(diǎn)故事閱讀 64,178評(píng)論 5 371
  • 文/花漫 我一把揭開白布谈秫。 她就那樣靜靜地躺著,像睡著了一般鱼鼓。 火紅的嫁衣襯著肌膚如雪拟烫。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 48,970評(píng)論 1 284
  • 那天蚓哩,我揣著相機(jī)與錄音构灸,去河邊找鬼。 笑死岸梨,一個(gè)胖子當(dāng)著我的面吹牛喜颁,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播曹阔,決...
    沈念sama閱讀 38,276評(píng)論 3 399
  • 文/蒼蘭香墨 我猛地睜開眼半开,長(zhǎng)吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼!你這毒婦竟也來了赃份?” 一聲冷哼從身側(cè)響起寂拆,我...
    開封第一講書人閱讀 36,927評(píng)論 0 259
  • 序言:老撾萬榮一對(duì)情侶失蹤,失蹤者是張志新(化名)和其女友劉穎抓韩,沒想到半個(gè)月后纠永,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 43,400評(píng)論 1 300
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡谒拴,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 35,883評(píng)論 2 323
  • 正文 我和宋清朗相戀三年尝江,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片英上。...
    茶點(diǎn)故事閱讀 37,997評(píng)論 1 333
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡炭序,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出苍日,到底是詐尸還是另有隱情惭聂,我是刑警寧澤,帶...
    沈念sama閱讀 33,646評(píng)論 4 322
  • 正文 年R本政府宣布相恃,位于F島的核電站辜纲,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜侨歉,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,213評(píng)論 3 307
  • 文/蒙蒙 一屋摇、第九天 我趴在偏房一處隱蔽的房頂上張望揩魂。 院中可真熱鬧幽邓,春花似錦、人聲如沸火脉。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,204評(píng)論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽倦挂。三九已至畸颅,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間方援,已是汗流浹背没炒。 一陣腳步聲響...
    開封第一講書人閱讀 31,423評(píng)論 1 260
  • 我被黑心中介騙來泰國(guó)打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留犯戏,地道東北人送火。 一個(gè)月前我還...
    沈念sama閱讀 45,423評(píng)論 2 352
  • 正文 我出身青樓,卻偏偏與公主長(zhǎng)得像先匪,于是被迫代替她去往敵國(guó)和親种吸。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 42,722評(píng)論 2 345

推薦閱讀更多精彩內(nèi)容