-
-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blank page when generating html doc #1063
Comments
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request. |
I'm also experimenting the issue when running the following command : npx @asyncapi/generator@1.14.1 asyncapi.yaml @asyncapi/html-template@1.0.0 --force-write -p singleFile=true -p outFilename=events.html Which is weird since I'm using a fixed version for both By using the Unable to resolve template location at undefined. Package is not available locally. Error: Cannot find module '@asyncapi/html-template@1.0.0/package.json'
Require stack:
- /usr/local/lib/node_modules/noop.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/home/redacted/.npm/_npx/48b847941f53c355/node_modules/@asyncapi/generator/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
at resolveFileName (/home/redacted/.npm/_npx/48b847941f53c355/node_modules/@asyncapi/generator/node_modules/resolve-from/index.js:29:39)
at resolveFrom (/home/redacted/.npm/_npx/48b847941f53c355/node_modules/@asyncapi/generator/node_modules/resolve-from/index.js:43:9)
at module.exports (/home/redacted/.npm/_npx/48b847941f53c355/node_modules/@asyncapi/generator/node_modules/resolve-from/index.js:46:47)
at utils.getTemplateDetails (/home/redacted/.npm/_npx/48b847941f53c355/node_modules/@asyncapi/generator/lib/utils.js:207:30)
at /home/redacted/.npm/_npx/48b847941f53c355/node_modules/@asyncapi/generator/lib/generator.js:509:26
at new Promise (<anonymous>)
at Generator.installTemplate (/home/redacted/.npm/_npx/48b847941f53c355/node_modules/@asyncapi/generator/lib/generator.js:502:12)
at Generator.installAndSetupTemplate (/home/redacted/.npm/_npx/48b847941f53c355/node_modules/@asyncapi/generator/lib/generator.js:259:73)
at Generator.generate (/home/redacted/.npm/_npx/48b847941f53c355/node_modules/@asyncapi/generator/lib/generator.js:174:16)
at Generator.generateFromFile (/home/redacted/.npm/_npx/48b847941f53c355/node_modules/@asyncapi/generator/lib/generator.js:472:17)
at async /home/redacted/.npm/_npx/48b847941f53c355/node_modules/@asyncapi/generator/cli.js:157:9 {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/usr/local/lib/node_modules/noop.js' ]
}
Template installation started because the template cannot be found on disk.
Template @asyncapi/html-template successfully installed in /home/redacted/.npm/_npx/48b847941f53c355/node_modules/@asyncapi/generator/node_modules/@asyncapi/html-template.
Version of used template is 1.0.0.
[BABEL] Note: The code generator has deoptimised the styling of /home/redacted/.npm/_npx/48b847941f53c355/node_modules/@asyncapi/generator/node_modules/@asyncapi/html-template/template/js/asyncapi-ui.min.js as it exceeds the max of 500KB.
File /home/redacted/sources/media/prject/api-doc/index.html.js couldn't be found. Error: ENOENT: no such file or directory, stat '/home/redacted/sources/media/prject/api-doc/index.html.js'
File /home/redacted/sources/media/prject/api-doc/js/asyncapi-ui.min.js couldn't be found. Error: ENOENT: no such file or directory, stat '/home/redacted/sources/media/prject/api-doc/js/asyncapi-ui.min.js'
File /home/redacted/sources/media/prject/api-doc/css/asyncapi.min.css couldn't be found. Error: ENOENT: no such file or directory, stat '/home/redacted/sources/media/prject/api-doc/css/asyncapi.min.css'
File /home/redacted/sources/media/prject/api-doc/css/global.min.css couldn't be found. Error: ENOENT: no such file or directory, stat '/home/redacted/sources/media/prject/api-doc/css/global.min.css'
Done! ✨
Check out your shiny new generated files at /home/redacted/sources/media/prject/api-doc.
|
Yes, it was working a few days ago...
…---
La planète a besoin de vous !
🌍 [Alternatiba Caen](https://alternatiba.eu/caen/)
🚧 [eXtinction Rebellion](https://extinctionrebellion.fr/)
💪 [SuperLocal](https://superlocal.team/)
✊ [OnEstLa.Tech](https://onestla.tech/)
Envoyé depuis Proton Mail mobile
-------- Message d'origine --------
Le 9 nov. 2023 à 17:34, Nigel Almada a écrit :
I'm also experimenting the issue when running the following command :
npx @***@***.*** asyncapi.yaml @***@***.*** --force-write -p singleFile=true -p outFilename=events.html
Which is weird since I'm using a fixed version for both @asyncapi/generator and @asyncapi/html-template and that nothing new has been released recently on both (was working fine 6 days ago)
By using the --debug flag, I've this :
Unable
to
resolve
template
location
at
undefined
.
Package
is
not
available
locally
.
Error
:
Cannot
find
module
***@***.******@***.***/package.json'
Require
stack
:
-
/
usr
/
local
/
lib
/
node_modules
/
noop
.
js
at
Function
.
Module
.
_resolveFilename
(
node
:
internal
/
modules
/
cjs
/
loader
:
995
:
15
)
at
Function
.
Module
.
_resolveFilename
.
sharedData
.
moduleResolveFilenameHook
.
installedValue
[
as
_resolveFilename
]
(
/
home
/
redacted
/
.
npm
/
_npx
/
48
b847941f53c355
/
node_modules
/
@
asyncapi
/
generator
/
node_modules
/
@
cspotcode
/
source-map-support
/
source
-
map
-
support
.
js
:
811
:
30
)
at
resolveFileName
(
/
home
/
redacted
/
.
npm
/
_npx
/
48
b847941f53c355
/
node_modules
/
@
asyncapi
/
generator
/
node_modules
/
resolve
-
from
/
index
.
js
:
29
:
39
)
at
resolveFrom
(
/
home
/
redacted
/
.
npm
/
_npx
/
48
b847941f53c355
/
node_modules
/
@
asyncapi
/
generator
/
node_modules
/
resolve
-
from
/
index
.
js
:
43
:
9
)
at
module
.
exports
(
/
home
/
redacted
/
.
npm
/
_npx
/
48
b847941f53c355
/
node_modules
/
@
asyncapi
/
generator
/
node_modules
/
resolve
-
from
/
index
.
js
:
46
:
47
)
at
utils
.
getTemplateDetails
(
/
home
/
redacted
/
.
npm
/
_npx
/
48
b847941f53c355
/
node_modules
/
@
asyncapi
/
generator
/
lib
/
utils
.
js
:
207
:
30
)
at
/
home
/
redacted
/
.
npm
/
_npx
/
48
b847941f53c355
/
node_modules
/
@
asyncapi
/
generator
/
lib
/
generator
.
js
:
509
:
26
at
new
Promise
(
<
anonymous
>
)
at Generator.installTemplate ***@***.***/generator/lib/generator.js:502:12)
at Generator.installAndSetupTemplate ***@***.***/generator/lib/generator.js:259:73)
at Generator.generate ***@***.***/generator/lib/generator.js:174:16)
at Generator.generateFromFile ***@***.***/generator/lib/generator.js:472:17)
at async ***@***.***/generator/cli.js:157:9
{
code
:
'MODULE_NOT_FOUND'
,
requireStack
:
[
'/usr/local/lib/node_modules/noop.js'
]
}
Template installation started because the template cannot be found on disk.
Template @asyncapi/html-template successfully installed in ***@***.******@***.***/html-template.
Version of used template is 1.0.0.
[BABEL] Note: The code generator has deoptimised the styling of ***@***.******@***.***/html-template/template/js/asyncapi-ui.min.js as it exceeds the max of 500KB.
File /home/redacted/sources/media/prject/api-doc/index.html.js couldn't be found. Error: ENOENT: no such file or directory, stat '/home/redacted/sources/media/prject/api-doc/index.html.js'
File /home/redacted/sources/media/prject/api-doc/js/asyncapi-ui.min.js couldn't be found. Error: ENOENT: no such file or directory, stat '/home/redacted/sources/media/prject/api-doc/js/asyncapi-ui.min.js'
File /home/redacted/sources/media/prject/api-doc/css/asyncapi.min.css couldn't be found. Error: ENOENT: no such file or directory, stat '/home/redacted/sources/media/prject/api-doc/css/asyncapi.min.css'
File /home/redacted/sources/media/prject/api-doc/css/global.min.css couldn't be found. Error: ENOENT: no such file or directory, stat '/home/redacted/sources/media/prject/api-doc/css/global.min.css'
Done! ✨
Check out your shiny new generated files at /home/redacted/sources/media/prject/api-doc.
—
Reply to this email directly, [view it on GitHub](#1063 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ACWCGTGJFH52Q7IENISMC3LYDUA3BAVCNFSM6AAAAAA7EICFXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBUGE3DOMZXGY).
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Downgrading to |
Thanks @sl-nigelalmada I confirm this fixes the issue for me too. |
Lets continue in asyncapi/html-template#456 |
Describe the bug
When I generate the html doc from my asyncapi file, and I open it in my browser, I get a blank page (nothing displayed).
How to Reproduce
I use asyncapi/cli version 0.60.0.
asyncapi generate fromTemplate asyncapi.yml --force-write @asyncapi/html-template -o public/asyncapi
asyncapi.yml
Expected behavior
A nice asyncapi documentation.
The text was updated successfully, but these errors were encountered: