question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cptble is not defined

See original GitHub issue

Hello

I am having problems with this line of code, I can’t see if the variable cptable is declared anywhere.

 C:\Users\Simon\AppData\Roaming\npm\node_modules\xl-json\node_modules\xlsx\xlsx.js:9
    if(typeof cptable === 'undefined') cptable = require('./dist/cpexcel');
                                               ^

 ReferenceError: cptable is not defined
at C:\Users\Simon\AppData\Roaming\npm\node_modules\xl-json\node_modules\xlsx\xlsx.js:9:45
at Object.<anonymous> (C:\Users\Simon\AppData\Roaming\npm\node_modules\xl-json\node_modules\xlsx\xlsx.js:5389:3)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (C:\Users\Simon\AppData\Roaming\npm\node_modules\xl-json\node_modules\j\j.js:4:12)
at Module._compile (module.js:425:26)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:20 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
Nidlow155commented, Jul 29, 2022

While running my tests in Jest I am still getting this error ReferenceError: cptable is not defined. The stack trace as follows: at make_xlsx (node_modules/react-export-excel/node_modules/xlsx/xlsx.js:10:44) at Object.<anonymous> (node_modules/react-export-excel/node_modules/xlsx/xlsx.js:6:1) at Object.<anonymous> (node_modules/react-export-excel/dist/ExcelPlugin/components/ExcelFile.js:19:13) at Object.<anonymous> (node_modules/react-export-excel/dist/index.js:7:18) at Object.<anonymous> (src/components/ExportList/ExportList.js:2:1) I’ve tried npm install xlsx@latest and that didn’t solve the problem.

2reactions
damianobarbaticommented, Apr 17, 2017

Has this been fixed? A lot of people is using strict mode everywhere to enforce best practices.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'ReferenceError: cptable is not defined' when running Jest ...
Well, this library didn't help so went with another one. react-html-table-to-excel. Here, you need to create a html table and then that ...
Read more >
cptable-fixed-xlsx-style - npm
Start using cptable-fixed-xlsx-style in your project by running `npm i ... There are no other projects in the npm registry using ...
Read more >
cptable is not defined at make_xlsx - Code Grepper
cptable is not defined at make_xlsx. Add Answer | View In TPC Matrix. Technical Problem Cluster First Answered On July 30, 2020 Popularity...
Read more >
cptable is not defined at make_xlsx Code Example
cptable is not defined at make_xlsx. Anonymous Exchangist. npm install xlsx@latest. Add Own solution. Log in, to leave a comment.
Read more >
xlsx-style坑记录 - CSDN博客
ReferenceError: cptable is not defined ... (function make_xlsx(XLSX){ 的下面就可以var cptable, style_builder, QUOTE, _hashIndex, _listIndex, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found