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.

Doesn't work with browserify or webpack.

See original GitHub issue

EDIT: please raise a new issue if you encounter build issues with browserify, webpack, requirejs, systemjs, or any other module bundler or loader or packaging system.

In webpack I get this error:

ERROR in ../~/xlsx/xlsx.js
Module not found: Error: Cannot resolve module 'fs' in /Users/Ram/Desktop/bob/node_modules/xlsx
 @ ../~/xlsx/xlsx.js 32:3635-3648 33:3206-3224

ERROR in ../~/xlsx/ods.js
Module not found: Error: Cannot resolve module 'fs' in /Users/Ram/Desktop/bob/node_modules/xlsx
 @ ../~/xlsx/ods.js 67:9-27

ERROR in ../~/xlsx/dist/cpexcel.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./cptable in /Users/Ram/Desktop/bob/node_modules/xlsx/dist
 @ ../~/xlsx/dist/cpexcel.js 1:165488-165513

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:7
  • Comments:55 (12 by maintainers)

github_iconTop GitHub Comments

79reactions
whythedaycommented, Nov 28, 2015

I was able to get it building by adding the following to my webpack config:

    node: {
            fs: 'empty'
    },
    externals: [
        {
            './cptable': 'var cptable'
        }
    ]
8reactions
whythedaycommented, May 31, 2016

@akhnaeton @arirawr It doesn’t look like XLSX.readFile is meant for the browser: https://github.com/SheetJS/js-xlsx#parsing-workbooks. Looks like you should be using XLSX.read.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack or Browserify & Gulp: Which Is Better? - Toptal
It results in highly modular CSS, largely eliminating the issue of unwanted cascading behavior. Suppose we have two React components, Component1 and Component2 ......
Read more >
Browserify vs Webpack - Medium
Webpack attacks the build problem in a fundamentally more integrated and opinionated manner. In Browserify you use Gulp/Grunt and a long list ...
Read more >
Webpack doesn't work with browserify-built bundles · Issue #319
I ran into a problem using React from bower (see facebook/react#1635 (comment)). ... Webpack doesn't work with browserify-built bundles #319.
Read more >
Webpack vs. Browserify - Educative.io
Browserify is less flexible than Webpack. It uses tools such as Gulp and Grunt to define bundling workflows. Browserify requires plugins like split-require...
Read more >
Browserify vs Webpack | Comparison Table with Infografic
This is a guide to Browserify vs Webpack. Here we discuss the key differences with infographics and comparison table of Browserify vs Webpack....
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