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.

Example plugin from template not building

See original GitHub issue

I’m following the getting started tutorial at http://docs.ajenti.org/en/latest/dev/intro.html but fail to build a basic plugin.

These are the steps I follow:

  • Create a new plugin in the current directory:
ajenti-dev-multitool --new-plugin "Some plugin name"
  • Build resources:
cd some_plugin_name
ajenti-dev-multitool --build
  • And start it:
sudo ajenti-dev-multitool --run-dev

I get this error first for ‘ajenti-dev-multitool --build’:

yaml.constructor.ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python/object:aj.plugins.PluginDependency'
  in "./plugin.yml", line 10, column 7

After updating ‘plugin.yml’ from

...
dependencies:
    - !!python/object:aj.plugins.PluginDependency {
        plugin_name: core
...

To

...
dependencies:
    - !PluginDependency {
        plugin_name: core
...

Now, I receive this error:

INFO Building resources for .
INFO Compiling ./resources/js/module.es
INFO Compiling ./resources/js/routing.es
INFO Compiling ./resources/js/controllers/index.controller.es
ERROR BUILD FAILED
INFO   3 error(s):
ERROR  * ./resources/js/module.es
WARNING b'You have mistakenly installed the `babel` package, which is a no-op in Babel 6.'
WARNING b"Babel's CLI commands have been moved from the `babel` package to the `babel-cli` package."
WARNING b''
WARNING b'    npm uninstall babel'
WARNING b'    npm install --save-dev babel-cli'
WARNING b''
WARNING b'See http://babeljs.io/docs/usage/cli/ for setup instructions.'
ERROR  * ./resources/js/controllers/index.controller.es
WARNING b'You have mistakenly installed the `babel` package, which is a no-op in Babel 6.'
WARNING b"Babel's CLI commands have been moved from the `babel` package to the `babel-cli` package."
WARNING b''
WARNING b'    npm uninstall babel'
WARNING b'    npm install --save-dev babel-cli'
WARNING b''
WARNING b'See http://babeljs.io/docs/usage/cli/ for setup instructions.'
ERROR  * ./resources/js/routing.es
WARNING b'You have mistakenly installed the `babel` package, which is a no-op in Babel 6.'
WARNING b"Babel's CLI commands have been moved from the `babel` package to the `babel-cli` package."
WARNING b''
WARNING b'    npm uninstall babel'
WARNING b'    npm install --save-dev babel-cli'
WARNING b''
WARNING b'See http://babeljs.io/docs/usage/cli/ for setup instructions.'

Anyone know what’s going wrong or can give me a link to a working demo plugin?

Thanks in advance!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kiarncommented, Jul 6, 2021

Hello @H4gi,

Many thanks for mentioning this error with the PluginDependency, I will correct this tomorrow.

About the error with babel, did you encounter any error while installing babel-cli ? I mean this command :

npm -g install bower babel-cli babel-preset-es2015 babel-plugin-external-helpers less coffee-script angular-gettext-cli angular-gettext-tools

On which system did you try ? I’ve just tested on a Ubuntu 20.04, and it works fine.

Cheers

Arnaud

0reactions
joppesmeetscommented, Jul 21, 2021

@kiarn Yes!

Read more comments on GitHub >

github_iconTop Results From Across the Web

WordPress Plugin Development Best Practices
This article will look at four options for creating plugin boilerplates. If there's a particular option you're interested in, feel free to jump ......
Read more >
goatcorp/SamplePlugin: Simple example plugin for ... - GitHub
Simple example plugin for XIVLauncher/Dalamud. Contribute to goatcorp/SamplePlugin development by creating an account on GitHub.
Read more >
Creating New Plugins - non-content only - missing templates?
Hi, New Plugin Creation Panel does not show any other plugins but “Content Only Plugins” and I am trying to create a Editor...
Read more >
CloudBees Template plugin
The CloudBees Template plugin gives the Jenkins administrator the opportunity to provide users a simplified and directed experience for configuring jobs, ...
Read more >
How to create a WordPress Page Template in a plugin
A WordPress Tutorial on how to create a page template in a plugin. You can use a WordPress page template for any page...
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