Will the future Volto include a dropdown menu?

I can find dropdown menu in the Volto 18, there is some addon out there.

Do future Volto include a native dropdown menu?

The Volto Light Theme already has a dropdown menu. It's implemented as "fat" menu, you can see it in action at demo.plone.org

I follow the instructions and

got error, do you have idea what I am doing wrong?

TypeError: Cannot read properties of undefined (reading 'modulePath')
at defaultModify (/mnt/HDD2/VOLTO/test-com/frontend/core/packages/volto/razzle.config.js:331:57)
at modifyWebpackConfig (/mnt/HDD2/VOLTO/test-com/frontend/core/packages/volto/razzle.config.js:457:27)
at /mnt/HDD2/VOLTO/test-com/frontend/node_modules/.pnpm/razzle@4.2.18_@babel+core@7.26.0_babel-preset-razzle@4.2.18_eslint@8.57.1_html-webpack-plugin_nvra5mldcm7qyfv3nq5oebxjbi/node_modules/razzle/config/createConfigAsync.js:1069:22
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
/mnt/HDD2/VOLTO/test-com/frontend/core/packages/volto:
ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @plone/volto@18.0.0-alpha.47 start: make build-deps && razzle start
Exit status 1
ELIFECYCLE Command failed with exit code 1.

Please share the instructions that you're following.

please forgive me, I cam complete new to Volto

Is that

  1. add

"dependencies": {
"@eeacms/volto-accordion-block": "^10.4.0",
"@kitconcept/volto-button-block": "^2.3.1",
"@kitconcept/volto-dsgvo-banner": "^1.3.0",
"@kitconcept/volto-heading-block": "^2.4.0",
"@kitconcept/volto-highlight-block": "^3.0.0",
"@kitconcept/volto-introduction-block": "^1.0.0",
"@kitconcept/volto-separator-block": "^4.0.0",
"@kitconcept/volto-slider-block": "^6.0.0",
"@kitconcept/volto-light-theme": "^2.0.0",
}

to /frontend/package.json

  1. modify

/frontend/volto.config.js

as

const addons = ['@kitconcept/volto-light-theme'];
const theme = '@kitconcept/volto-light-theme';

module.exports = {
addons,
theme,
};

  1. pnpm install

no error

  1. HOST=x.x.x.x pnpm start

and result

sswp> !!! Script exited with code 1

And frontend not started

2nd Try

I also try

add
"dependencies": {
"@eeacms/volto-accordion-block": "^10.4.0",
"@kitconcept/volto-button-block": "^2.3.1",
"@kitconcept/volto-dsgvo-banner": "^1.3.0",
"@kitconcept/volto-heading-block": "^2.4.0",
"@kitconcept/volto-highlight-block": "^3.0.0",
"@kitconcept/volto-introduction-block": "^1.0.0",
"@kitconcept/volto-separator-block": "^4.0.0",
"@kitconcept/volto-slider-block": "^6.0.0",
"@kitconcept/volto-light-theme": "^2.0.0",
}

add

"addons": [
"@eeacms/volto-accordion-block",
"@kitconcept/volto-button-block",
"@kitconcept/volto-heading-block",
"@kitconcept/volto-introduction-block",
"@kitconcept/volto-highlight-block",
"@kitconcept/volto-separator-block",
"@kitconcept/volto-light-theme",
"your_policy_addon_here"
],

to /frontend/package.json

modify
/frontend/volto.config.js

as

const addons = ['@kitconcept/volto-light-theme'];
const theme = '@kitconcept/volto-light-theme';

module.exports = {
addons,
theme,
};

pnpm install
no error

HOST=x.x.x.x pnpm start
and result

sswp> !!! Script exited with code 1

And frontend not started

I normally use yarn. Since you're using pnpm, you can probably add new dependencies to your package.json with

pnpm add @kitconcept/volto-light-theme
pnpm install

This adds the package to your dependencies.
To add it to your addons, edit your package.json
so it looks something like this:

  "addons": [
    "@eeacms/volto-accordion-block",
    "@kitconcept/volto-button-block",
    "@kitconcept/volto-heading-block",
    "@kitconcept/volto-introduction-block",
    "@kitconcept/volto-highlight-block",
    "@kitconcept/volto-separator-block",
    "@kitconcept/volto-light-theme",  /* <------ add it second to last */
    "your_special_policy_addon"
  ],

Declare the theme in your project package.json:

  "theme": "@kitconcept/volto-light-theme",

I generally change anything related to config.settings n the config.js of my volto project.

I follow all you replied and when run

HOST=43.252.40.115 pnpm start

It result error

plone@test:/mnt/HDD2/VOLTO/test-com/frontend$ HOST=43.252.40.115 pnpm start
/home/plone/.nvm/versions/node/v20.18.0/lib/node_modules/corepack/dist/lib/corepack.cjs:22147
throw new UsageError(Invalid package.json in ${import_path8.default.relative(initialCwd, manifestPath)});
^

UsageError: Invalid package.json in package.json
at loadSpec (/home/plone/.nvm/versions/node/v20.18.0/lib/node_modules/corepack/dist/lib/corepack.cjs:22147:13)
at async Engine.findProjectSpec (/home/plone/.nvm/versions/node/v20.18.0/lib/node_modules/corepack/dist/lib/corepack.cjs:22348:22)
at async Engine.executePackageManagerRequest (/home/plone/.nvm/versions/node/v20.18.0/lib/node_modules/corepack/dist/lib/corepack.cjs:22404:24)
at async Object.runMain (/home/plone/.nvm/versions/node/v20.18.0/lib/node_modules/corepack/dist/lib/corepack.cjs:23096:5) {
clipanion: { type: 'usage' }
}

Node.js v20.18.0

remove the last comma from dependencies and module.exports, like:

  "dependencies": {
    "@plone/plonetheme-barceloneta-base": "~3.2.0a4",
    "@popperjs/core": "^2.11.6",
    "select2": "^4.1.0-rc.0"
  }

Sorry may I know the path of the file?

In the files you pasted above

@pigeonflight @mtrebron

Thanks for your reply, I have try all method and now it result error

ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @plone/volto@18.0.0-alpha.47 start: make build-deps && razzle start
Exit status 1
ELIFECYCLE Command failed with exit code 1.

@pigeonflight @mtrebron

I just do a clean install follow Create a project with Volto (development or pre-release) – Install — Plone Documentation v6.0

And it result same error

ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @plone/volto@18.0.0 start: make build-deps && razzle start
Exit status 1
ELIFECYCLE Command failed with exit code 1.

Maybe I should wait for Plone 7

A search of this forum can help as well:

Thanks the Volto is start but error again

when install volto light theme

ERROR Unexpected error

TypeError: Cannot read properties of undefined (reading 'modulePath')
at defaultModify (/mnt/HDD2/VOLTO/test-com/frontend/core/packages/volto/razzle.config.js:331:57)
at modifyWebpackConfig (/mnt/HDD2/VOLTO/test-com/frontend/core/packages/volto/razzle.config.js:457:27)
at /mnt/HDD2/VOLTO/test-com/frontend/node_modules/.pnpm/razzle@4.2.18_@babel+core@7.26.0_babel-preset-razzle@4.2.18_eslint@8.57.1_html-webpack-plugin_67tqjzqs4n3n7i3jcusp4gkkdy/node_modules/razzle/config/createConfigAsync.js:1069:22
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
/mnt/HDD2/VOLTO/test-com/frontend/core/packages/volto:
ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @plone/volto@18.0.0 start: make build-deps && razzle start
Exit status 1
ELIFECYCLE Command failed with exit code 1.