Skip to content

Building with xlsx npm module fails #3

@jussiarpalahti

Description

@jussiarpalahti

I run into this yesterday:

> cbuild -d -v -m systemjs-hot-reloader -o dist/bundle.js -C config-npm.js

Bundling for development (NODE_ENV = undefined and --debug set)

Build error:
Error on fetch for fs.js at file:///Users/jta/tmp/hierarchicaltable-example-app/fs.js
	Loading node_modules/xlsx/xlsx.js
	Loading node_modules/makeMaps/dist/ui_components/import_wizard/FileUploadView.js
	Loading node_modules/makeMaps/dist/ui_components/import_wizard/LayerImportWizard.js
	Loading node_modules/makeMaps/dist/MakeMaps.js
	Loading dist/index.js
	Error: ENOENT: no such file or directory, open '/Users/jta/tmp/hierarchicaltable-example-app/fs.js'
    at Error (native)

I believe the module https://github.com/SheetJS/js-xlsx is the culprit. It would seem cbuild doesn't see node's internal modules correctly and tries to find them in the project folders?

I can make a complete test case later if you wish, but wanted to report this already...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions