Skip to content

Cannot run with module bundler #29

@cloudlena

Description

@cloudlena

I would like to use this library with a create-react-app application. However, when I import it, I get the following error:

Module not found: Error: Can't resolve './lib-cov/gpx-parse' in '/Users/me/js/jespr-web/node_modules/gpx-parse'

When I make the following change to index.js, it works:

- module.exports = process.env.GPXPARSE_COV ? require('./lib-cov/gpx-parse') : require('./lib/gpx-parse');
+ module.exports = require('./lib/gpx-parse');

It seems like the require statement is evaluated even then process.env.GPXPARSE_COV is false. Can we remove this check?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions