運(yùn)行cnmp run dev后,出現(xiàn)
C:\work\oms\src\oms-web\src\main\java\cn\fcgyl\oms\web\view>cnpm install
/ Installing es6-symbol@3platform unsupported webpack-dev-server@2.1.0-beta.10 ? chokidar@1.6.1 ? fsevents@1.0.15 Package require os(darwin) not compatible with your platform(win32)
[fsevents@^1.0.0] optional install error: Package require os(darwin) not compatible with your platform(win32)
C:\work\oms\src\oms-web\src\main\java\cn\fcgyl\oms\web\view\node_modules\.2.2.3@nodejieba>node "C:\Users\FC_091hf\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\node-gyp-bin\\node-gyp.js" rebuild
** 雖然提示不適合Windows,但是問題好像是sass loader出問題的。所以只要執(zhí)行下面即可 **
可以嘗試:
npm update
npm install
nodejs node_modules/node-sass/scripts/install.js
npm rebuild node-sass
不過只要
cnpm rebuild node-sass
#不放心可以重新安裝下
cnpm install
就夠了
然后再運(yùn)行,OK。
然后我在Vue.js中出現(xiàn)關(guān)于hotkey的問題如下:
Uncaught TypeError:_WEBPACK_IMPORTED
MODULE_0_hotkeys_js_src_hotkeys_js___default(...) is not a function
源代碼為
mounted: function () {
hotkeys("f", (event, handler) => {
event.preventDefault();
event.stopPropagation();
this.toggleSearchBox();
});
}
通過
cnpm remove hotkeys-js
cnpm install hotkeys-js
重新安裝嘗試了下,問題依舊。
不清楚問題 所在,只好先try/catch掉。
mounted: function () {
try{
hotkeys("f", (event, handler) => {
event.preventDefault();
event.stopPropagation();
this.toggleSearchBox();
});
}
catch(err){}
}
有知道的幫忙私信下哈哈