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.

Error by importing the project

See original GitHub issue

Hello,

I’m trying to use this exciting library. After installing the react-data-export package in my existing react application I get an error when I import the package by using import ReactExport from 'react-data-export';

I have the following error.

../framework/~/tempa-xlsx/xlsx.js
Module not found: Error: Cannot resolve module 'fs' in /home/ogodon/projects/framework/node_modules/tempa-xlsx
resolve module fs in /home/ogodon/projects/framework/node_modules/tempa-xlsx
  looking for modules in /home/ogodon/projects/company/node_modules
    /home/ogodon/projects/company/node_modules/fs doesn't exist (module as directory)
    resolve 'file' fs in /home/ogodon/projects/company/node_modules
      resolve file

Module fs cannot be found. So my question would be : is this package only meant to be used on a server context ?

Thank you for your time.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

20reactions
aleknakcommented, Apr 16, 2019

@xariaSg npm install xlsx --save solved it for me.

2reactions
securedevelopercommented, Oct 19, 2018

Hi @ogodon, you need to explicitly define fs in configuration file, for example, in case of webpack, add following lines to your webpack.config.js file,

.....
node: {fs: 'empty'},
externals: [
    {'./cptable': 'var cptable'},
    {'./jszip': 'jszip'}
 ]

Hope that will help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Project import errors – Support Portal | Snyk
This error appears if the imported repository contains HCL version 1 files. Snyk only supports HCL version 2, used from Terraform version 0.12+....
Read more >
Error when importing a project from an exported GitLab project
Steps to reproduce​​ Export a project on GitLab.com and then attempt import a new project using the export file.
Read more >
Project 2010: Error, "an import error occurred" opening
The “import” errors are correct because when you open the project, it is “importing” the data from the MPP file into the internal...
Read more >
Error 'The Project Was Not Imported Because ... - Oracle Support
1. The project was not imported because import errors exist for the project team members. 2. You can access this project only in...
Read more >
Project Import error using Project Configurator Plug-In
In order to work around this error you should review the Kanban board in the source instance and locate the query which contains...
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