原创 [wechat] 沒有找到可以構建的npm包 請確認需要參與構建的npm都在miniprogramRoot目錄內

  目標 微信小程序構建npm模塊   報錯 沒有找到可以構建的npm包 請確認需要參與構建的npm都在miniprogramRoot目錄內       原因 npm init -y 生成的package.json文件位置不對   解決

原创 [ts] typeof 'string' can not be used index type

typescript使用場景:用變量作爲object的key取值,語法報錯 typeof 'string'  can not be used index type   解決辦法 指定object的key的類型即可 obj: { [k:str

原创 [nginx] nginx emerg invalid number of arguments in "root" directive

系統 windows 命令 nginx  -t 報錯 nginx emerg invalid number of arguments in "root" directive.... 原因 root行配置最後沒寫分號導致,加上分號即可解決

原创 [qiankun] Failed to fetch has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header

  微前端框架 qiankun   控制檯報錯 single-spa.min.js?25a2:2 Uncaught TypeError: application 'vue2' died in status LOADING_SOURCE_CO

原创 [nginx] [emerg] invalid parameter "https//payapp.weixin.qq.com" in xxx.conf

目標 Nginx配置添加header頭"X-Frame-Options"   配置 在nginx location模塊下添加一行:  add_header x-Frame-Options ALLOW_FROM https://payapp.

原创 [nginx] [emerg] the 'http2' parameter requires ngx_http_v2_module

  系統:Linux 升級http2.0 修改Nginx配置:  listen 443 ssl http2 default_server;  nginx -t  // 報錯 nginx -s reload  // error.log中報錯

原创 [java] @Override is not allowed when implementing interface method

IntelliJ IDEA 報錯:@Override is not allowed when implementing interface method 解決辦法:修改module設置 File->Project Structure->

原创 [npm] ERROR in Cannot find module 'node-sass'

解決辦法: cnpm install node-sass@latest 

原创 [electron] winston Uncaught TypeError: self._addDefaultMeta is not a function

    electron使用winston記錄log 控制檯報錯 Uncaught TypeError: self._addDefaultMeta is not a function at DerivedLogger.(anonymous

原创 [webpack] [HMR] Hot Module Replacement is disabled

webpack提示 [HMR] Hot Module Replacement is disabled 解決辦法是webpack配置裏添加HMR插件即可

原创 [webpack]zsh: command not found: webpack

環境:mac    工程已安裝局部依賴包 npm install webpack webpack-cli -D 配置好webpack.config.js文件 但執行webpack報錯 zsh: command not found: webp

原创 [typescript] ERROR TS18002: The 'files' list in config file 'tsconfig.json' is empty.

網上可搜到的解決辦法是修改webpack配置,顯示指定tsconfig.json 個人理解:這樣做意外着webpack沒有找到配置文件,並不是報錯中說的files選項爲空 但修改配置後並沒解決整個報錯 { test: /\.tsx?$/,

原创 [typescript] ts-loader! Module build failed: Error: Could not find source file:

個人理解:在控制檯看到原本admin/index.vue 自動轉成了 admin/index.vue.ts 解決辦法: { test: /\.vue$/, loader: 'vue-loader', options: { loaders: