This relative module was not found:* ./cptable in ./node_modules/xlsx-style/dist

783 阅读1分钟

项目中安装了xlsx-style组件,且版本是^0.8.13,使用npm run serve启动项目时报错。This relative module was not found:* ./cptable in ./node_modules/xlsx-style/dist 报错截图

image.png

经过网上搜索,发现不是程序本身的错误,而是在该插件目录下有个程序写错了。 在node_modules中的xlsx-style/dist/cpexcel.js文件中的807行 var cpt = require('./cpt' + 'able'); 有误,应该改成 var cpt = cptable;就可启动程序了。

搜索链接:blog.csdn.net/qq_24044863…