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

Installing a plugin results in an error when running patternlab. #916

Closed
fallenturtle opened this issue Aug 1, 2018 · 9 comments
Closed
Assignees

Comments

@fallenturtle
Copy link

fallenturtle commented Aug 1, 2018

I am using Pattern Lab Node 3.0.0-alpha.16 on Mac, with Node v10.3.0, using a Vanilla Edition. I used starterkit-mustache-demo.

Expected Behavior

Pattern Lab should build successfully.

Actual Behavior

It fails with this error:

plraw@1.0.0 patternlab /Users/abailey/Sites/plraw
patternlab "build"

Pattern Lab Node v3.0.0-alpha.16
Pattern Engine mustache: good to go
⊙ patternlab → Error: ENOENT: no such file or directory, scandir 'plugin-'

Steps to Reproduce
  • Install Pattern Lab Node Core using 0 to 60mph instructions with edition node and
    starterkit-mustache-demo.
  • "npm run patternlab build" to confirm it builds successfully (it does)
  • install plugin using "npm run patternlab -- install --plugins @pattern-lab/plugin-tab"
  • "npm run patternlab build" again. This time it fails with above error.

I also after this tried installing the plugin using "npm install plugin-node-tab --save" but that didn't work.

May or may not be relevant, but out of curiosity I created a directory called "plugin-" and put it in the root of the project. When I did the build command again I got:

⊙ patternlab → TypeError: undefined is not a function

instead of the scandir error. I tried moving the plugin-tab folder to the root though and that didn't work.

@fallenturtle
Copy link
Author

Note: I upgraded to node v10.7.0 and the error remains.

@raphaelokon
Copy link
Contributor

Thanks for reporting @fallenturtle – this almost seems like there is a regression in the plugin installation process. Can you confirm the if plugin was installed and is set on the PL config?

@fallenturtle
Copy link
Author

So this is in my config:

"plugins": {
    "@pattern-lab/plugin-tab": {
        "enabled": true
    }
}

It was initially set to false. Regardless of this setting I still get this error.
The plugin itself is at node_modules/@pattern-lab/plugin-tab

@mattmccarley
Copy link
Contributor

I'm still having this same issue. Am I correct that this was not resolved in the latest beta release?

@raphaelokon
Copy link
Contributor

@mdmccarley89 I am looking into it.

@abangert
Copy link

abangert commented Oct 1, 2018

So, trying to figure out what was going wrong here (for plugin-tab) I encountered a lot of issues:

  • in uikit, typo in line 15 of plugin-loader.js ("lugins" instead of "plugins")
  • in plugin-tab/index.js, the pluginName constant matches the output plugin file name but not the module name/location of the plugin ("pattern-lab-plugin-tab vs @pattern-lab/plugin-tab), so those need to be reconciled (or need two diff constants)
  • core plugin-manager.js in initializePlugins tries to pass functions via plugin_manager that aren't available (is_plugin, load_plugin) - see inside the plugin_manager return for what it wants (this is source of cited TypeError)
  • pattern-lab-plugin-tab.js wants to use Panels.add and there are multiple reasons that isn't available
  • at which point I gave up (this code is outside my familiarity, so I'm not going to try to fix and pull request, and I don't know what is in knowingly still in process of being refactored - didn't realize how dev this still was up front)

@mlnmln
Copy link

mlnmln commented Feb 11, 2019

@raphaelokon what's the status here? Basically I have the same problem as #958 but the plugin system for node pattern lab 3.x seem to be regressed/broken currently. In case I could be of any help, please point me in the right direction.

@mfranzke
Copy link
Contributor

I am using Pattern Lab Node v5.10.1 on Mac OS, with Node v13.12.0, using @pattern-lab/edition-node Edition. The problem doesn’t occur any more on this setup.

@fallenturtle could you please retest ?

@JosefBredereck
Copy link
Contributor

No answer since June last year. Seams to be resolved.

antonia-rose pushed a commit to quelltexterin/nemo-uikit-workshop that referenced this issue Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants