Open oscarr-reyes opened 8 years ago
This happens on the mac as well. Somewhere this library html escapes all file paths, regardless of wether they are local or not. When the OS is presented with this html escaped version of the path it cannot find the file
YAMLError: cannot read /Users/wdullaer/Documents/Programming%20Projects/consumer-api/docs-source/wiki/overview.md (Error: ENOENT: no such file or directory, open '/Users/wdullaer/Documents/Programming%20Projects/consumer-api/docs-source/wiki/overview.md')
at ReadFileContext.callback (/usr/local/lib/node_modules/raml2slate/node_modules/raml-parser/lib/raml.js:66:34)
at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:365:13)
Parser gets an error and no longer works when it tries to load included files in a raml file
for example, the files are placed like this:
c:/Users/LDV Tech/RAML/api.raml c:/Users/LDV Tech/RAML/schemas/tokens.json
raml parser is used like this:
The error comes when
raml-parser
tries to loadtokens.json
because at some point the directory for this file is processed like this:c:/Users/LDV%20Tech/RAML/schemas/tokens.json
. For some reason Documents folder is excluded, and also the user folder encodes the name so windows does not recognize itif necessary, here is the part of the RAML document that gets this error
OS: Windows 10 Enterprise 64x Nodejs Version: 6.2.0 Package Version: 0.8.18