Skip to content

Error running CLI #112

@KurtPreston

Description

@KurtPreston
  • Are you running the latest version?
  • Have you included sample input, output, error, and expected output?
  • Have you checked if you are using correct configuration?

I believe there is an issue in the package.json. It should be declaring lib/parser.js under the files key. Without it, the CLI mode doesn't work.

Input

When I try to run:

npm install --save-dev fast-xml-parser
./node_modules/.bin/xml2js -V test.xml

Output

I get the error:

module.js:538
    throw err;
    ^

Error: Cannot find module './lib/parser'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/myproject/node_modules/fast-xml-parser/cli.js:6:16)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)

Would you like to work on this issue?

  • Yes
  • No

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