Comments (6)
I'm also experimenting the issue when running the following command :
npx @asyncapi/[email protected] asyncapi.yaml @asyncapi/[email protected] --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 '@asyncapi/[email protected]/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.
from generator.
Downgrading to @asyncapi/[email protected]
and @asyncapi/[email protected]
fixes the issue for me
from generator.
Lets continue in asyncapi/html-template#456
from generator.
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.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
from generator.
from generator.
Thanks @sl-nigelalmada I confirm this fixes the issue for me too.
from generator.
Related Issues (20)
- [Docs Bug 🐞 report]: The `template-constant` link is broken at the generator docs HOT 6
- [Docs Bug 🐞 report]: The `AsyncAPI document` button is broken at the generator docs HOT 3
- [📑 Docs]: Improve documentation related to `File templates` feature HOT 10
- `conditionalFiles` feature is broken when template uses `server` special parameter HOT 1
- Incoming changes for generator HOT 3
- Support platform generator type templates to infrastructure as code HOT 4
- [BUG] Docker container html template is not compatible with generator HOT 3
- Figure out what development flow will be without cli.js HOT 5
- Add Post-installation script for Cli.js deprecation and migration
- Migration Guide to md & post-installation script to deprecate `cli.js` HOT 4
- create our own changeset bot HOT 1
- Provide a development.md or **Development Guide** in readme where you explain how to start project locally and do some basic manual tests and how to run existing tests in isolated docker env HOT 1
- Put all (most) templates into the generator together for better developers' experience HOT 9
- Deprecate Nunjucks and Create Migration Guide to React HOT 3
- [BUG] Generation failing with `Generator Error: Installation failed` HOT 7
- [FEATURE]: Make `compile` option default to `false` in future major release HOT 1
- Title HOT 2
- docs no longer pushed to website HOT 8
- Proof of concept of templates as part of generator monorepo HOT 7
- Move hooks inside monorepo HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generator.