Code Monkey home page Code Monkey logo

Comments (6)

sl-nigelalmada avatar sl-nigelalmada commented on September 27, 2024 1

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.

sl-nigelalmada avatar sl-nigelalmada commented on September 27, 2024 1

Downgrading to @asyncapi/[email protected] and @asyncapi/[email protected] fixes the issue for me

from generator.

jonaslagoni avatar jonaslagoni commented on September 27, 2024 1

Lets continue in asyncapi/html-template#456

from generator.

github-actions avatar github-actions commented on September 27, 2024

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.

mamyn0va avatar mamyn0va commented on September 27, 2024

from generator.

mamyn0va avatar mamyn0va commented on September 27, 2024

Thanks @sl-nigelalmada I confirm this fixes the issue for me too.

from generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.