Skip to content

Missing grunt dependencies #99

@NicolasGoeddel

Description

@NicolasGoeddel

Hi,

I was trying to compile my bundles using plone-compile-resources but got some issue because several npm packages were missing. I needed to install a few packages to make it work (see below). Also there was a NoneType error here because I had a bundle without resources and bundle.resources was None in this case.


If fixed it with an if bundle.resources around the for loop.

Then I was able to cd into my package source directory and run the command like so:

user@machine:~/Plone/zeocluster/src/my.package$ sudo apt install npm
user@machine:~/Plone/zeocluster/src/my.package$ plone-compile-resources -i ../../bin/client1 -s Plone3
...FAILING...
user@machine:~/Plone/zeocluster/src/my.package$ npm install grunt-cli less-plugin-inline-urls grunt-contrib-requirejs grunt-contrib-uglify grunt-sed
user@machine:~/Plone/zeocluster/src/my.package$ plone-compile-resources -i ../../bin/client1 -s Plone3
...SUCCESS...

It ran without errors.

Unfortunately I was thinking it will create the missing theme-compiled.css file after installing a theme using bobtemplates.plone but I guess I am making something wrong. However it seems that the script plone-compile-resources does not work out of the box on a Plone 5.2 installation with Python 3.8.x.

This is the section of my develop.cfg for installing the script:

parts +=
    resources

[resources]
recipe = zc.recipe.egg
eggs =
    plone.staticresources
scripts = plone-compile-resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions