记录一次ml-matrix/src/symmetricMatrix.js的报错
解决方案
ERROR Failed to compile with 2 errors 12:58:00 error in ./node_modules/ml-matrix/src/symmetricMatrix.jsModule parse failed: Unexpected character '#' (8:2)You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders| export class SymmetricMatrix extends AbstractMatrix {| /** @type {Matrix} */> #matrix;| | get size() { @ ./node_modules/ml-matrix/src/index.js 2:0-34 2:0-34 @ ./node_modules/@antv/layout/es/layout/mds.js @ ./node_modules/@antv/layout/es/layout/index.js @ ./node_modules/@antv/layout/es/index.js @ ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/modules/visualDrill/components/dependencyAnalysis.vue?vue&type=script&lang=js @ ./src/modules/visualDrill/components/dependencyAnalysis.vue?vue&type=script&lang=js @ ./src/modules/visualDrill/components/dependencyAnalysis.vue @ ./src/modules/visualDrill sync .ts|.tsx|.vue$ @ ./src/modules/visualDrill/configure.ts @ ./src/modules sync configure.ts$ @ ./src/plugin.ts @ ./src/main.ts @ multi (webpack)-dev-server/client?http://172.16.16.191:9002&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts error in ./node_modules/ml-matrix/src/matrix.jsModule parse failed: Unexpected token (1587:6)You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders| * @type {Float64Array[]}| */> data;|| /** @ ./node_modules/ml-matrix/src/index.js 1:0-70 1:0-70 1:0-70 1:0-70 @ ./node_modules/@antv/layout/es/layout/mds.js @ ./node_modules/@antv/layout/es/layout/index.js @ ./node_modules/@antv/layout/es/index.js @ ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/modules/visualDrill/components/dependencyAnalysis.vue?vue&type=script&lang=js @ ./src/modules/visualDrill/components/dependencyAnalysis.vue?vue&type=script&lang=js @ ./src/modules/visualDrill/components/dependencyAnalysis.vue @ ./src/modules/visualDrill sync .ts|.tsx|.vue$ @ ./src/modules/visualDrill/configure.ts @ ./src/modules sync configure.ts$ @ ./src/plugin.ts @ ./src/main.ts @ multi (webpack)-dev-server/client?http://172.16.16.191:9002&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts
解决方案
更换ml-matrix的版本号"version": “6.11.0"为"version”: “6.10.2”,
"node_modules/ml-matrix": { "version": "6.10.2", "resolved": "http://verdaccio.hatech.com.cn:4873/ml-matrix/-/ml-matrix-6.10.2.tgz", "integrity": "sha512-+yxwzMazC76DAsgEvDrdCfRMH7+lO7UdnuWllavnPeWkPD2oIBA6rLzvst7BFYUxzgRz/h6V6lLzYIYtTvINbw==" },