plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
448 stars 610 forks source link

Cannot resolve custom syntax module "postcss-less" #3701

Closed nileshgulia1 closed 1 year ago

nileshgulia1 commented 1 year ago

Describe the bug The error originates after upgrading my volto addon to run stylelint from volto-addon-ci after I run the upgrade steps in https://github.com/plone/volto/blob/master/docs/source/upgrade-guide/index.md#upgraded-to-razzle-4

Expected behavior The command should run successfully.

davisagli commented 1 year ago

@nileshgulia1 Can you share the full stack trace for the error so that it's possible to see where the error is happening?

postcss-less is a dependency of @plone/volto, so it's not immediately obvious what is going wrong.

wesleybl commented 1 year ago

In https://github.com/plone/volto/blob/master/docs/source/upgrade-guide/index.md#upgraded-to-razzle-4 says:

You should also do a final step, and change the babel.config.js, removing the preset from razzle/babel to razzle

But @plone/generator-volto uses razzle/babel:

https://github.com/plone/volto/blob/af0a18dd8c02ce0b6c1c5c63d46164709d1ea533/packages/generator-volto/generators/addon/templates/babel.config.js#L3

Shouldn't he be razzle?

nileshgulia1 commented 1 year ago

This is fixed locally.