question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Unknown plugin hooks: "plugins" found in plugin

See original GitHub issue

The docs for node.api.js state that you can use plugins in a plugin the same way you can in static.config.js; however, when I try to do so I get the error: Unknown plugin hooks: "plugins" found in plugin

Environment

  System:
    OS: Windows 10
    CPU: (8) x64 AMD FX(tm)-8350 Eight-Core Processor
    Memory: 5.49 GB / 15.96 GB
  Binaries:
    Node: 11.10.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.13.0 - C:\Program Files\nodejs\yarn.CMD
    npm: 6.7.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.17763.1.0
    Internet Explorer: 11.0.17763.1
  npmPackages:
    react: ^16.8.6 => 16.8.6
    react-dom: ^16.8.6 => 16.8.6
    react-jss: ^8.6.1 => 8.6.1
    react-markdown: ^4.0.8 => 4.0.8
    react-moment: ^0.9.2 => 0.9.2
    react-static: ^7.0.9 => 7.0.9
    react-static-plugin-jss: ^7.0.8 => 7.0.8
    react-static-plugin-reach-router: ^7.0.8 => 7.0.8
    react-static-plugin-sitemap: ^7.0.8 => 7.0.8
    react-static-plugin-source-filesystem: ^7.0.8 => 7.0.8

Steps to Reproduce the problem

Base your steps off of any freshly installed react-static template!

  1. Create a node.api.js plugin
  2. Add any plugin to that plugin’s config
  3. Build

Reproducible Demo

https://github.com/Herohtar/thalion-herohtar/tree/jss-plugin

Full error

> Executing task in folder thalion-herohtar: npm run stage <


> thalion-herohtar@0.1.0 stage C:\Users\Me\Desktop\HTML\thalion-herohtar
> react-static build --staging

Bundling application for Staging...

  Error: The following error occurred in the plugin: "C:\Users\Me\Desktop\HTML\thalion-herohtar"

  Error: Unknown plugin hooks: "plugins" found in plugin: C:\Users\Me\Desktop\HTML\thalion-herohtar
  - plugins.js:26 validatePlugin
    [thalion-herohtar]/[react-static]/src/static/plugins.js:26:11

  - getConfig.js:318 resolvePlugin
    [thalion-herohtar]/[react-static]/src/static/getConfig.js:318:7

  - Array.map

  - getConfig.js:336 map
    [thalion-herohtar]/[react-static]/src/static/getConfig.js:336:29

  - getConfig.js:74 buildConfig
    [thalion-herohtar]/[react-static]/src/static/getConfig.js:74:10

  - getConfig.js:53 buildConfigFromPath
    [thalion-herohtar]/[react-static]/src/static/getConfig.js:53:11

  - bundle.js:29 _callee$
    [thalion-herohtar]/[react-static]/src/commands/bundle.js:29:17

  - runtime.js:45 tryCatch
    [thalion-herohtar]/[regenerator-runtime]/runtime.js:45:40

  - runtime.js:271 Generator.invoke [as _invoke]
    [thalion-herohtar]/[regenerator-runtime]/runtime.js:271:22

  - runtime.js:97 Generator.prototype.(anonymous function) [as next]
    [thalion-herohtar]/[regenerator-runtime]/runtime.js:97:21

  - asyncToGenerator.js:3 asyncGeneratorStep
    [thalion-herohtar]/[@babel]/runtime/helpers/asyncToGenerator.js:3:24

  - asyncToGenerator.js:25 _next
    [thalion-herohtar]/[@babel]/runtime/helpers/asyncToGenerator.js:25:9

  - asyncToGenerator.js:32
    [thalion-herohtar]/[@babel]/runtime/helpers/asyncToGenerator.js:32:7

  - new Promise

  - asyncToGenerator.js:21
    [thalion-herohtar]/[@babel]/runtime/helpers/asyncToGenerator.js:21:12

  - bundle.js:135 bundle
    [thalion-herohtar]/[react-static]/lib/commands/bundle.js:135:20

  - build.js:5 _callee$
    [thalion-herohtar]/[react-static]/src/commands/build.js:5:17

  - runtime.js:45 tryCatch
    [thalion-herohtar]/[regenerator-runtime]/runtime.js:45:40

  - runtime.js:271 Generator.invoke [as _invoke]
    [thalion-herohtar]/[regenerator-runtime]/runtime.js:271:22

  - runtime.js:97 Generator.prototype.(anonymous function) [as next]
    [thalion-herohtar]/[regenerator-runtime]/runtime.js:97:21

  - asyncToGenerator.js:3 asyncGeneratorStep
    [thalion-herohtar]/[@babel]/runtime/helpers/asyncToGenerator.js:3:24

  - asyncToGenerator.js:25 _next
    [thalion-herohtar]/[@babel]/runtime/helpers/asyncToGenerator.js:25:9

  - asyncToGenerator.js:32
    [thalion-herohtar]/[@babel]/runtime/helpers/asyncToGenerator.js:32:7

  - new Promise

  - asyncToGenerator.js:21 Object.<anonymous>
    [thalion-herohtar]/[@babel]/runtime/helpers/asyncToGenerator.js:21:12

  - build.js:48 Object.build [as default]
    [thalion-herohtar]/[react-static]/lib/commands/build.js:48:19

  - react-static:208 build
    [thalion-herohtar]/[react-static]/bin/react-static:208:50

  - react-static:54 init
    [thalion-herohtar]/[react-static]/bin/react-static:54:12

  - react-static:5 Object.<anonymous>
    [thalion-herohtar]/[react-static]/bin/react-static:5:1

  - loader.js:738 Module._compile
    internal/modules/cjs/loader.js:738:30

  - loader.js:749 Object.Module._extensions..js
    internal/modules/cjs/loader.js:749:10

  - loader.js:630 Module.load
    internal/modules/cjs/loader.js:630:32

  - loader.js:570 tryModuleLoad
    internal/modules/cjs/loader.js:570:12

  - loader.js:562 Function.Module._load
    internal/modules/cjs/loader.js:562:3

  - loader.js:801 Function.Module.runMain
    internal/modules/cjs/loader.js:801:12

  - run_main_module.js:21
    internal/main/run_main_module.js:21:11

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
SleeplessBytecommented, Jul 17, 2019

@Herohtar yes that’s the only change needed!

0reactions
Herohtarcommented, Jun 17, 2019

Is that literally the only change needed? If so, I can create a PR.

I’d forgotten about this issue as my use case went away due to the changes in the MUIv4 API.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plugins — Slash 1.13.0 documentation
During the activation all hook methods get registered to their respective hooks, so any plugin containing an unknown hook will trigger an exception....
Read more >
Fatal Error – No conflit with othyer plugins - WordPress.org
Hi, Just installed your plugin which looks wonderful. After activating i immediately ... Fatal error: Uncaught ValueError: Unknown format specifier "R" in ...
Read more >
pluggy.manager — pytest documentation
You can register new hooks by calling ``add_hookspec(module_or_class)``. You can register plugin objects (which contain hooks) by calling ...
Read more >
Fix common installation issues with Creative Cloud app ...
This error occurs when you are trying to install extensions or plugins using commands with sudo on the Universal Plugin Installer Agent (UPIA) ......
Read more >
eslint-plugin-jest - npm
Usage. Add jest to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found