development-mode-live with local app directory
dirkschmid opened this issue · comments
Dirk Schmid commented
Hi,
i'm running in an issue when i want to run the development-mode-live with an local application source directory.
my command is: spectacle -D -a app target/swagger.json
and then i always get this error:
module.js:557
throw err;
^
Error: Cannot find module 'app/lib/resolve-references.js'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at loadData (/Users/dirkschmid/.nvm/versions/node/v9.4.0/lib/node_modules/spectacle-docs/index.js:55:24)
at module.exports (/Users/dirkschmid/.nvm/versions/node/v9.4.0/lib/node_modules/spectacle-docs/index.js:59:70)
at Object.<anonymous> (/Users/dirkschmid/.nvm/versions/node/v9.4.0/lib/node_modules/spectacle-docs/bin/spectacle.js:39:1)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Function.Module.runMain (module.js:701:10)
at startup (bootstrap_node.js:193:16)
at bootstrap_node.js:617:3```
can someone help?
Matthew commented
I'm having a similar issue when trying to run using a local customized app directory.
spectacle -a template swagger.json
module.js:550
throw err;
^
Error: Cannot find module 'template/lib/resolve-references.js'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at loadData (/usr/local/lib/node_modules/spectacle-docs/index.js:55:24)
at module.exports (/usr/local/lib/node_modules/spectacle-docs/index.js:59:70)
at Object.<anonymous> (/usr/local/lib/node_modules/spectacle-docs/bin/spectacle.js:39:1)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
Natasha Theodora Petrus commented
@dirkschmid @mattosaur same issue here but only if I use relative path.
Try using the full path instead, this works for me:
spectacle -d -a "C:\Users\user\Documents\spectacle\app" swagger.json