Can't resolve './cptable' #554

Closed
opened 2017-02-08 15:36:07 +00:00 by keyiis · 6 comments
keyiis commented 2017-02-08 15:36:07 +00:00 (Migrated from github.com)

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
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 ```
gongph commented 2017-03-08 03:46:32 +00:00 (Migrated from github.com)

i hit the same error

i hit the same error
SheetJSDev commented 2017-03-10 23:46:06 +00:00 (Migrated from github.com)

@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.

@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.
nimatrazmjo commented 2018-09-22 11:16:09 +00:00 (Migrated from github.com)

Hey guys, I have the same problem using angular-cli 6.2.3 and angular 6. can anyone help me out. It works fine with webpack after adding './cptable': 'var cptable' to externals of webpack.

For some reason, I need to switch from webpack to angular-cli.

I do not know how to add './cptable': 'var cptable' in angular-cli @SheetJSDev .

Thanks in advance.

Hey guys, I have the same problem using angular-cli `6.2.3` and angular 6. can anyone help me out. It works fine with webpack after adding ` './cptable': 'var cptable'` to externals of webpack. For some reason, I need to switch from webpack to angular-cli. I do not know how to add ` './cptable': 'var cptable'` in angular-cli @SheetJSDev . Thanks in advance.
abhinavkumar985 commented 2018-10-17 19:28:05 +00:00 (Migrated from github.com)

Hey guys, I have the same problem using angular-cli 6.2.3 and angular 6. can anyone help me out. It works fine with webpack after adding './cptable': 'var cptable' to externals of webpack.

For some reason, I need to switch from webpack to angular-cli.

I do not know how to add './cptable': 'var cptable' in angular-cli @SheetJSDev .

Thanks in advance.

I am also facing same issue with Angular cli 6.2.3 ?

> Hey guys, I have the same problem using angular-cli `6.2.3` and angular 6. can anyone help me out. It works fine with webpack after adding `'./cptable': 'var cptable'` to externals of webpack. > > For some reason, I need to switch from webpack to angular-cli. > > I do not know how to add `'./cptable': 'var cptable'` in angular-cli @SheetJSDev . > > Thanks in advance. I am also facing same issue with Angular cli 6.2.3 ?
denisoby commented 2019-06-05 17:04:08 +00:00 (Migrated from github.com)

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

Hi all! @abhinavkumar985 @nimatullah could you please tell if you found the workaround for the issue?
TheDemonMahesh commented 2019-11-22 06:12:17 +00:00 (Migrated from github.com)

add declaration to cptable like
global.cptable = webpack_require(3);
remove "use strict" frpm those file

add declaration to cptable like global.cptable = __webpack_require__(3); remove "use strict" frpm those file
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#554
No description provided.