相关文章推荐
安静的豆浆  ·  【bug】【Cannot find ...·  9 月前    · 
聪明伶俐的青蛙  ·  java 与c 共享内存 ...·  1 年前    · 
果断的汤圆  ·  MYSQL报Fatal error ...·  1 年前    · 
含蓄的领带  ·  转]winform ...·  1 年前    · 

删除文件中原有的node_modules文件;

yarn install
npm run serve
但是程序启动的时候出现错误,显示:not found ./cptable in node_modules/xlsx-style/dist/cpexcel.js
这个不是程序的问题,而是,在该文件目录下面,有段程序写错了,

在该js文件里,第807行,var cpt = require(’./cpt’ + ‘able’);有误,改成var cpt = cptable;就可以正确启动程序了,至于为什么这样改,不知道,网上查的

这个是前段vue中的Excel文件导出时用到的,

【代码】This relative module was not found:* ./ cp ta ble in ./ node _ modules / xlsx - style / dis t/ cp excel . js 报错问题。 _ _ __ ____ _ _ ___ __ __ ___ ( \/ )( ) / ___)( \/ ) / __) / _\ ( ) / __) ) ( / (_/\\___ \ ) ( ( (__ / \/ (_/\( (__ (_/\_)\____/(____/(_/\_) \___)\_/\_/\____/ \___) npm install xlsx -calc 阅读具有出色的库的工作簿。 var XLSX = require ( ' xlsx ' ) ; var workbook = XLSX . readFile ( 'test. xlsx ' ) ; // change some cell value workbook . Sheets [ 'Sheet1' ] . A1 . v const CompressionPlugin = require("compression-webpack-plugin") module.exports = { publi cP ath: process.env. NODE _ENV === 'production' ? '/' : '/', configureWebpack: () This relative module was not found: * ./ cp ta ble in ./ node _ modules / xlsx - style / dis t/ cp excel . js 项目中用到了 xlsx xlsx - style ,但正常安装后,出现以下错误 * ./ cp ta ble in ./ node _ modules /_ xlsx - style @0.8.13@ xlsx - style / dis t/ cp excel . js 修改 node _ modules / xlsx - style / dis t/ cp excel . js 文件第 807 行为以下内容: var cp t = cp ta ble ; 前段时间,在做报表功能的时候,顺带的要实现报表导出的功能,进而用到了 xlsx - style 组件,然后,在程序启动的时候出现了错误,显示:not found ./ cp ta ble in node _ modules / xlsx - style / dis t/ cp excel . js , 发现问题所在是在文件:\ node _ modules \ xlsx - style \ dis t\ cp excel . js 807行 即 var cp t = require('./ cp t' + 'a ble '); 此时,把这行代码修改为 var cp t = c... xlsx 填充 用JavaScript编写的 Excel XLSX 解析器/生成器,具有 Node . js 和浏览器支持,jQuery / d3样式方法链接,加密,并专注于保持现有工作簿功能和样式不变。 查找和替换 支持的样式 SheetView窗格 从快递服务 浏览器使用情况 xlsx -populate如何工作 拉取请求清单 Gulp任务 API参考 Node . js npm install xlsx -populate 请注意, xlsx -populate使用ES6功能,因此仅支持 Node . js v4 +。 可以在examples / browser / index.html中找到功能强大的浏览器示例。 首先为 Node . js 编写 xlsx -