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.

Can't resolve './cptable'

See original GitHub issue

When i run sheetjs build xls,get below error:

ERROR in ./~/xlsx/dist/cpexcel.js
Module not found: Error: Can't resolve './cptable' in 'D:\work\nodejs\keypos\pos\node_modules\xlsx\dist'
resolve './cptable' in 'D:\work\nodejs\keypos\pos\node_modules\xlsx\dist'
  using description file: D:\work\nodejs\keypos\pos\node_modules\xlsx\package.json (relative path: ./dist)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: D:\work\nodejs\keypos\pos\node_modules\xlsx\package.json (relative path: ./dist)
    using description file: D:\work\nodejs\keypos\pos\node_modules\xlsx\package.json (relative path: ./dist/cptable)
      as directory
        D:\work\nodejs\keypos\pos\node_modules\xlsx\dist\cptable doesn't exist
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        D:\work\nodejs\keypos\pos\node_modules\xlsx\dist\cptable doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        D:\work\nodejs\keypos\pos\node_modules\xlsx\dist\cptable.js doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        D:\work\nodejs\keypos\pos\node_modules\xlsx\dist\cptable.ts doesn't exist
[D:\work\nodejs\keypos\pos\node_modules\xlsx\dist\cptable]
[D:\work\nodejs\keypos\pos\node_modules\xlsx\dist\cptable]
[D:\work\nodejs\keypos\pos\node_modules\xlsx\dist\cptable.js]
[D:\work\nodejs\keypos\pos\node_modules\xlsx\dist\cptable.ts]
 @ ./~/xlsx/dist/cpexcel.js 808:16-41
 @ ./~/xlsx/xlsx.js
ERROR in ./~/xlsx/dist/cpexcel.js
Module not found: Error: Can't resolve './cptable' in 'D:\work\nodejs\keypos\pos\node_modules\xlsx\dist'
resolve './cptable' in 'D:\work\nodejs\keypos\pos\node_modules\xlsx\dist'
  using description file: D:\work\nodejs\keypos\pos\node_modules\xlsx\package.json (relative path: ./dist)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: D:\work\nodejs\keypos\pos\node_modules\xlsx\package.json (relative path: ./dist)
    using description file: D:\work\nodejs\keypos\pos\node_modules\xlsx\package.json (relative path: ./dist/cptable)
      as directory
        D:\work\nodejs\keypos\pos\node_modules\xlsx\dist\cptable doesn't exist
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        D:\work\nodejs\keypos\pos\node_modules\xlsx\dist\cptable doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        D:\work\nodejs\keypos\pos\node_modules\xlsx\dist\cptable.js doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        D:\work\nodejs\keypos\pos\node_modules\xlsx\dist\cptable.ts doesn't exist
[D:\work\nodejs\keypos\pos\node_modules\xlsx\dist\cptable]
[D:\work\nodejs\keypos\pos\node_modules\xlsx\dist\cptable]
[D:\work\nodejs\keypos\pos\node_modules\xlsx\dist\cptable.js]
[D:\work\nodejs\keypos\pos\node_modules\xlsx\dist\cptable.ts]
 @ ./~/xlsx/dist/cpexcel.js 808:16-41
 @ ./~/xlsx/xlsx.js

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:17
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
SheetJSDevcommented, Mar 10, 2017

@keyiis @gongph @jbutz @nengkuai @Scimonster @aarree @limjoe @emoragaf @imdzeeshan @jkurei @bdsoha @xiaofuchuan we are rolling out version 0.9.1 in which we reworked the codepage build process. That errant require has been removed.

4reactions
denisobycommented, Jun 5, 2019

Hi all! @abhinavkumar985 @nimatullah could you please tell if you found the workaround for the issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues - GitHub
Hi, I am gettin cptable cant resolve error while running the project. I have added 'xlsx-style' module in my app for apply styling...
Read more >
cptable-fixed-xlsx-style - npm
Start using cptable-fixed-xlsx-style in your project by running `npm i cptable-fixed-xlsx-style`. There are no other projects in the npm ...
Read more >
js-xlsx - Bountysource
Hi,. I am gettin cptable cant resolve error while running the project. I have added 'xlsx-style' module in my app for apply styling...
Read more >
Can't resolve 'xlsx' in 'filelocation\node_modules\cptable-fixed ...
While running my build command I am facing this can't resolve xlsx error in cptable-fixed-xlsx-style package.
Read more >
Xlsx-style-correct NPM
Fix the problem: ERROR in ./node_modules/xlsx-style/dist/cpexcel.js Module not found: Error: Can't resolve './cptable' in ...
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