我有以下问题:
我正在使用 Cypress 进行自动化测试。我创建了一个本地服务器,一个端点,我总是需要在测试之前启动并在测试之后始终关闭。
我尝试了一种方法,但出现以下错误:
Error: Webpack Compilation Error
./node_modules/mysql2/node_modules/lru-cache/dist/mjs/index.js 51:11
Module parse failed: Unexpected character '#' (51:11)
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
| length;
| private constructor
> static #constructing = false;
| static create(max) {
| const HeapCls = getUintArray(max);
@ ./node_modules/mysql2/lib/parsers/parser_cache.js 3:12-32
@ ./node_modules/mysql2/promise.js
Run Code Online (Sandbox Code Playgroud)
有谁能够帮助我?
我上传到服务器的文件(index.js):
const express = require("express");
const app = express();
const port = 3000;
const programmingLanguagesRouter …
Run Code Online (Sandbox Code Playgroud)