Skip to content
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

[ERROR] TypeError: ctx.emit is not a function #423

Closed
iMuhammadMustafa opened this issue Apr 21, 2024 · 1 comment · Fixed by #424
Closed

[ERROR] TypeError: ctx.emit is not a function #423

iMuhammadMustafa opened this issue Apr 21, 2024 · 1 comment · Fixed by #424
Assignees

Comments

@iMuhammadMustafa
Copy link

I'm trying to use the theme but I keep getting this error.

» [ERROR] TypeError: ctx.emit is not a function
at tryLoadFile (C:\Home\Projects\Ui-Library\node_modules\sassdoc-theme-herman\node_modules\sassdoc-extras\src\description.js:26:11)
at Function.description (C:\Home\Projects\Ui-Library\node_modules\sassdoc-theme-herman\node_modules\sassdoc-extras\src\description.js:15:21)
at module.exports (C:\Home\Projects\Ui-Library\node_modules\sassdoc-theme-herman\lib\prepareContext.js:151:10)
at Environment.herman [as theme] (C:\Home\Projects\Ui-Library\node_modules\sassdoc-theme-herman\index.js:22:3)
at theme (C:\Home\Projects\Ui-Library\node_modules\sassdoc\dist\sassdoc.js:351:23)
at _callee$ (C:\Home\Projects\Ui-Library\node_modules\sassdoc\dist\sassdoc.js:288:22)
at tryCatch (C:\Home\Projects\Ui-Library\node_modules\regenerator-runtime\runtime.js:62:40)
at Generator.invoke [as _invoke] (C:\Home\Projects\Ui-Library\node_modules\regenerator-runtime\runtime.js:296:22)
at prototype. [as next] (C:\Home\Projects\Ui-Library\node_modules\regenerator-runtime\runtime.js:114:21)
at step (C:\Home\Projects\Ui-Library\node_modules\babel-runtime\helpers\asyncToGenerator.js:17:30)
at C:\Home\Projects\Ui-Library\node_modules\babel-runtime\helpers\asyncToGenerator.js:28:13
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

I tried to specify a specific file inside a test folder to try to identify the problem

"scripts": { 
    "documentsass": "sassdoc ./src/stylesheets/abstracts/test --theme herman"
}

sassdoc is installed locally not globally and it works without the --theme herman

This is the only file I have inside the folder _colors.scss

/*
    The main/primary color 
    → used for the links, the button background color, etc.  In general, it’s the main call-to-action color.
    The accent color 
    → used to highlight something important on the page. It shouldn’t be a variation of the primary color, but a complementary color.
    A scale of neutral colors 
    → It’s generally a scale of grayscale tones, to be used for text elements, subtle elements, borders, etc.
    Feedback colors → success, error, warning.
*/

// Theme Colors
/// Sass variables for defining theme colors and feedback colors.
/// @author Muhammad

/// @type variable - The main/primary color used for links, buttons, etc.
$primary: #0d6efd !default;
/// @type variable - The accent color for highlighting important elements.
$secondary: #6c757d !default;
/// @type variable - Color indicating success or positive feedback.
$success: #198754 !default;
/// @type variable - Color indicating informational messages or neutral feedback.
$info: #0dcaf0 !default;
/// @type variable - Color indicating a warning or cautionary feedback.
$warning: #ffc107 !default;
/// @type variable - Color indicating errors or critical feedback.
$danger: #dc3545 !default;
/// @type variable - A light neutral color for backgrounds or subtle elements.
$light: #f8f9fa !default;
/// @type variable - A dark neutral color for text or borders.
$dark: #212529 !default;
@jgerigmeyer
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants