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.

cannot work with exceljs using angular-cli (1.1.1)

See original GitHub issue

I always get the following error when trying to use exceljs within my angular-application (created and running with angular-cli 1.1.1)

ERROR in ./~/natives/index.js
Module not found: Error: Can't resolve 'module' in 'C:\XXX\node_modules\natives'
 @ ./~/natives/index.js 2:13-30
 @ ./~/unzip2/~/graceful-fs/fs.js
 @ ./~/unzip2/~/graceful-fs/graceful-fs.js
 @ ./~/unzip2/~/fstream/lib/file-writer.js
 @ ./~/unzip2/~/fstream/fstream.js
 @ ./~/unzip2/lib/extract.js
 @ ./~/unzip2/unzip.js
 @ ./~/exceljs/dist/es5/stream/xlsx/workbook-reader.js
 @ ./~/exceljs/dist/es5/index.js
 @ ./src/app/app.component.ts
 @ ./src/app/app.module.ts
 @ ./src/main.ts
 @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts

anybody else running in this issue? am I doing wrong something? I added the library by running npm install exceljs --save and imported it ultimately in various ways and always ended up with the error above.

would be great you could help me out to get this lib used in my project. thanks! 😃

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

13reactions
marc0olocommented, Jun 11, 2017

well as I read in other issues this has something to do with typescript … got it working now by importing the lib as follows: import * as ExcelJs from 'exceljs/dist/exceljs.min.js';

1reaction
fidooglecommented, Apr 30, 2018

@marc0olo import * as ExcelJs from 'exceljs/dist/exceljs.min.js'; worked for me in CodeSandbox.io Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

exceljs - npm
Read, manipulate and write spreadsheet data and styles to XLSX and JSON. Reverse engineered from Excel spreadsheet files as a project.
Read more >
Can't export excel using ExcelJS - error TS2307: Cannot find ...
In your tsconfig.app.json file add "types": ["node"]. Note, that the "types" are in the compilerOptions section of the tsconfig.
Read more >
exceljs - npm.io
Read, manipulate and write spreadsheet data and styles to XLSX and JSON. Reverse engineered from Excel spreadsheet files as a project. Translations. 中文文档 ......
Read more >
Open Source Used In Assist 3.1 - Cisco
This document contains licenses and notices for open source software used in ... 1.32 use-isomorphic-layout-effect 1.1.1 ... 1.296 angular-sanitize 1.8.0.
Read more >
parsing error: cannot read properties of undefined (reading 'map ...
I'm trying to use the eslint command on my angular project in the terminal to check a typescript component for errors. I'm getting...
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