(一)、报错问题 注意:出现下面问题的解决方法 npm WARN old lockfile npm WARN old lockfile The package-lock.json file was created with an old version of npm, npm WARN old lockfile so supplemental metadata must be fetched from the registry. npm WARN old lockfile npm WARN old lockfile This is a one-time fix-up, please be patient... npm WARN old lockfile changed 1 package, and audited 2 packages in 6s found 0 vulnerabilities 报错原因:npm 版本过高,解决方法见第如下 降低 npm 版本 1、npm i npm@6 -g 2、npm install (二)、页面适配配置 将 node-modules 文件夹下的 lib-flexible -> flexible.js 文件中的 refreshRem 函数改为以下函数(全局搜索 lib-flexible) function refreshRem(){ var width = docEl.getBoundingClientRect().width; if (width / dpr > 540) { width = width \* dpr; } var rem = width / 10; docEl.style.fontSize = rem + 'px'; flexible.rem = win.rem = rem; }