Module not found #2526

Closed
opened 2022-02-17 19:20:57 +00:00 by blueiceprj · 3 comments
blueiceprj commented 2022-02-17 19:20:57 +00:00 (Migrated from github.com)

Angular 13 - xlsx

Version : 0.18.2

Module not found: Error: Can't resolve './dist/cpexcel.js' in '....../node_modules/xlsx/dist'

Angular 13 - xlsx Version : 0.18.2 Module not found: Error: Can't resolve './dist/cpexcel.js' in '....../node_modules/xlsx/dist'
blueiceprj commented 2022-02-25 01:06:09 +00:00 (Migrated from github.com)

I am using "xlsx.mini.min.js" to export data. In 0.18.0 version everything works fine.

I am using "xlsx.mini.min.js" to export data. In 0.18.0 version everything works fine.
SheetJSDev commented 2022-02-25 01:09:36 +00:00 (Migrated from github.com)

0.18.1 flipped from CJS to ESM. You should be using the import directly without an override.

Irrespective of best practices, it should work with the mini build. How are you doing the webpack override?

0.18.1 flipped from CJS to ESM. You should be using the import directly without an override. Irrespective of best practices, it should work with the mini build. How are you doing the webpack override?
SheetJSDev commented 2022-02-26 04:39:48 +00:00 (Migrated from github.com)

@blueiceprj @kingyue737 just pushed a commit with a few fixes to remove some node globals and manually suppress the require statements. If you have control over the override, can you manually download the xlsx.mini.min.js script from the repo and adjust the webpack config to use this? If it works, we can publish a new release with the changes

@blueiceprj @kingyue737 just pushed a commit with a few fixes to remove some node globals and manually suppress the require statements. If you have control over the override, can you manually download [the `xlsx.mini.min.js` script from the repo](https://raw.githubusercontent.com/SheetJS/sheetjs/master/dist/xlsx.mini.min.js) and adjust the webpack config to use this? If it works, we can publish a new release with the changes
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#2526
No description provided.