Minimalist Volto on Windows?

I know that the recommended way to run this on Windows is with WSL because of the Make commands. The systems team at my employer restricts local administrator roles which WSL needs, so this is a non-starter for me. But I really only want the absolute minimal requirements for local development - I don't need Docker or Ansible or any kind of production deployment solution. I appreciate the work gone into making all of this setup possible, but I'm hoping I can get the basics going without needing to use Make, maybe just enough to do yarn build and razzle start. (Side note: I already have Plone backup running on Windows without a problem. And we deploy on RHEL servers/pods)

I swear I have had this working before, but I think some of the docs and/or training I was looking at have changed. I know that cookiecutter-plone-starter was deprecated recently, for example. I distinctly remember starting on a training and looking through the omelette directory, which I presume is now created with Make but wasn't in some past iteration.

Anyway, here's what I've tried today:

* npm install -g yo @plone/generator-volto
* yo @plone/volto volto
* cd volto
* yarn

The yarn command fails with this log:

# This file contains the result of Yarn building a package (volto@workspace:.)
# Script name: postinstall

'make' is not recognized as an internal or external command,
operable program or batch file.
command not found: make

Ok, I comment out the postinstall section of package.json and run yarn again, as a proof of concept. That step applies a patch to createJestConfig.js and builds the omelette symlink. Are these a must? Yarn install works without error.

Running yarn start does give an error:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

(venv) PS C:\Users\myuser\volto> yarn start  
 WAIT  Compiling...


× Client
  Compiled with some errors in 12.12s

( ) Server
  

<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:3001/, http://[::1]:3001/
<i> [webpack-dev-server] Content not from webpack is served from 'C:\Users\myuser\volto\public' directory
<i> [webpack-dev-server] 404s will fallback to '/index.html'
assets by path static/media/*.svg 92.3 KiB
  assets by chunk 76.1 KiB (auxiliary name: client) 106 assets
  assets by chunk 9.89 KiB (auxiliary name: Contents) 14 assets
  assets by chunk 2.72 KiB (auxiliary name: GroupsControlpanel) 2 assets
  assets by chunk 906 bytes (auxiliary name: plone-volto-components-manage-Controlpanels-AddonsControlpanel) 2 assets
  assets by chunk 453 bytes (auxiliary name: RulesControlpanel) 2 assets
  + 5 assets
assets by path static/js/*.js 18.5 MiB
  asset static/js/client.js 9.91 MiB [emitted] [big] (name: client) 1 related asset
  asset static/js/react-dates.chunk.js 964 KiB [emitted] (name: react-dates) 1 related asset
  asset static/js/rc-time-picker.chunk.js 761 KiB [emitted] (name: rc-time-picker) 1 related asset
  asset static/js/Widgets.chunk.js 759 KiB [emitted] (name: Widgets) 1 related asset
  asset static/js/react-virtualized.chunk.js 569 KiB [emitted] (name: react-virtualized) 1 related asset
  + 54 assets
asset ..\assets.json 23.4 KiB [emitted]
Entrypoint client [big] 9.96 MiB (8.28 MiB) = static/js/runtime~client.js 50.8 KiB static/js/client.js 9.91 MiB 108 auxiliary assets
orphan modules 532 KiB [orphan] 189 modules
runtime modules 34.1 KiB 20 modules
modules by path ./node_modules/ 11.7 MiB
  cacheable modules 11.7 MiB 2757 modules
  optional modules 2.93 KiB [optional] 2 modules
modules by path ./locales/ 527 KiB
  ./locales/ lazy ^\.\/.*\.json$ namespace object 160 bytes [built] [code generated]
  + 11 modules
modules by path ./src/ 7.7 KiB
  modules by path ./src/*.js 5.19 KiB 4 modules
  ./src/reducers/index.js 1.46 KiB [built] [code generated]
  ./src/addons/volto-volto/src/index.js 1.05 KiB [built] [code generated]
../../AppData/Local/Temp/2/tmp-19268-jvekRZTHSkgq-.js 2.84 KiB [built] [code generated]
./util.inspect (ignored) 15 bytes [built] [code generated]
./package.json 8.54 KiB [built] [code generated]

LOG from webpack.FileSystemInfo
<w> Managed item C:\Users\myuser\volto\node_modules\@pmmmwh isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)        
<w> Managed item C:\Users\myuser\volto\node_modules\@loadable isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)      
<w> Managed item C:\Users\myuser\volto\node_modules\@plone isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> Managed item C:\Users\myuser\volto\node_modules\@redux-devtools isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> Managed item C:\Users\myuser\volto\node_modules\@babel isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> Managed item C:\Users\myuser\volto\node_modules\@dnd-kit isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)       
<w> Managed item C:\Users\myuser\volto\node_modules\@fluentui isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)      
<w> Managed item C:\Users\myuser\volto\node_modules\@emotion isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)       
<w> Managed item C:\Users\myuser\volto\node_modules\@formatjs isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)      
<w> Managed item C:\Users\myuser\volto\node_modules\@juggle isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)        
<w> Managed item C:\Users\myuser\volto\node_modules\@semantic-ui-react isn't a directory or doesn't contain a package.json (see snapshot.managedPaths opti
on)
<w> Managed item C:\Users\myuser\volto\node_modules\@seznam isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)        
<w> Managed item C:\Users\myuser\volto\node_modules\@popperjs isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)      
+ 14 hidden lines

ERROR in ./node_modules/@plone/volto/theme/themes/pastanaga/extras/extras.less 5:0
Module parse failed: Unexpected token (5:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| // and make behave it like the SemanticUI ones
|
> & {
|   @import 'main';
| }
 @ ./src/theme.js 4:0-67
 @ ./node_modules/@plone/volto/src/start-client.jsx 4:0-21
 @ ./src/client.js 3:0-47 4:0-6

ERROR in ./node_modules/semantic-ui-less/semantic.less 14:0
Module parse failed: Unexpected token (14:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| /* Global */
> & { @import "definitions/globals/reset"; }
| & { @import "definitions/globals/site"; }
|
 @ ./src/theme.js 3:0-40
 @ ./node_modules/@plone/volto/src/start-client.jsx 4:0-21
 @ ./src/client.js 3:0-47 4:0-6

webpack 5.90.1 compiled with 2 errors in 12140 ms

× Client
  

√ Server
  Compiled successfully in 6.06s

sswp> Handling Hot Module Reloading
✅  Server-side HMR Enabled!
API server (API_PATH) is set to: http://localhost:3000
Proxying API requests from http://localhost:3000/++api++ to http://localhost:8080/Plone
🎭 Volto started at 0.0.0.0:3000 🚀

I see the warning about webpack loaders, but I'm not sure what's going on. I don't see a webpack.config.js anywhere. I am able to load http://localhost:3000 but it gives the same error about loaders:

Module parse failed: Unexpected token (5:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| // and make behave it like the SemanticUI ones
| 
> & {
|   @import 'main';
| }

Any hints appreciated.

Which versions are you using?

$cmds = @("python", "pip", "npm", "nvm", "node", "corepack", "yo", "yarn")
foreach ($i in $cmds) {Write-Host "$i = $(Invoke-Expression "$i --version")"}

python = Python 3.11.9
pip = pip 22.3.1 from C:\Users\wohnlice\PycharmProjects\volto\venv\Lib\site-packages\pip (python 3.11)
npm = 10.9.0
node = v23.3.0
corepack = 0.29.4
yo = 5.0.0
yarn = 3.2.3

No nvm for Windows

If you aren’t allowed to use make, could you just run the same commands make would run for you? e.g., make -n should output the commands it would run, and you could write a shell script that does the same, for each make target.

GitHub - plone/cookieplone: Create Plone projects, addons, documentation with ease! is the new method, and in case you hadn't seen it, Erico gave an updated training at the conference. Should be covered here Plone Deployment — Plone Training 2024 documentation

If I understand correctly, it's a shame that you are being squeezed between "can't use make" and "don't want to or can't? use Docker".

That's what I'm trying to do. Obviously there's the root level Makefile and I'm looking at the install/preinstall commands there, but I don't know if there are other Makefiles used in the initial setup process.

Let me look into Erico's training, I hadn't seen that.

There is the top level makefile and others in the front and back end directories and possibly others

You can search for make files with find (or Get-ChildItem -Path ".\volto" -Recurse -Filter 'Makefile' in PowerShell). Search both in your volto and /usr/lib/node_modules/ directories.

Here the linux output:

$ find ./volto /usr/lib/node_modules/ -type f -name "Makefile"
./volto/node_modules/trim/Makefile
./volto/node_modules/delayed-stream/Makefile
./volto/node_modules/detect-port-alt/node_modules/debug/Makefile
./volto/node_modules/node-libs-browser/node_modules/isarray/Makefile
./volto/node_modules/retry/Makefile
./volto/node_modules/express/node_modules/debug/Makefile
./volto/node_modules/component-classes/Makefile
./volto/node_modules/finalhandler/node_modules/debug/Makefile
./volto/node_modules/snapdragon/node_modules/debug/Makefile
./volto/node_modules/dom-walk/Makefile
./volto/node_modules/superagent/Makefile
./volto/node_modules/format/Makefile
./volto/node_modules/expand-brackets/node_modules/debug/Makefile
./volto/node_modules/delegates/Makefile
./volto/node_modules/unset-value/node_modules/isarray/Makefile
./volto/node_modules/global-cache/Makefile
./volto/node_modules/compression/node_modules/debug/Makefile
./volto/node_modules/@plone/volto/node_modules/express/node_modules/debug/Makefile
./volto/node_modules/readable-stream/node_modules/isarray/Makefile
./volto/node_modules/send/node_modules/debug/Makefile
./volto/node_modules/component-indexof/Makefile
./volto/node_modules/body-parser/node_modules/debug/Makefile
./volto/node_modules/svgo/Makefile
./volto/Makefile
./volto/src/addons/volto-volto/Makefile
/usr/lib/node_modules/yo/node_modules/retry/Makefile
/usr/lib/node_modules/yo/node_modules/tabtab/Makefile
/usr/lib/node_modules/yo/node_modules/debug/Makefile
/usr/lib/node_modules/yo/node_modules/delegates/Makefile
/usr/lib/node_modules/yo/node_modules/isarray/Makefile
/usr/lib/node_modules/yo/node_modules/json-stringify-safe/Makefile
/usr/lib/node_modules/yo/node_modules/pad-component/Makefile
/usr/lib/node_modules/yo/node_modules/jake/Makefile
/usr/lib/node_modules/yo/node_modules/os-shim/Makefile
/usr/lib/node_modules/npm/node_modules/retry/Makefile
/usr/lib/node_modules/@plone/generator-volto/generators/app/templates/Makefile
/usr/lib/node_modules/@plone/generator-volto/generators/addon/templates/Makefile
/usr/lib/node_modules/@plone/generator-volto/node_modules/retry/Makefile
/usr/lib/node_modules/@plone/generator-volto/node_modules/progress/Makefile
/usr/lib/node_modules/@plone/generator-volto/node_modules/delegates/Makefile
/usr/lib/node_modules/@plone/generator-volto/node_modules/jake/Makefile

Maybe a (too?) simplistic method: in the top level directory, make -n > make_commands.sh will grab the commands it would run.

In that file, change any cd somesubdirectory1 && make to cd somesubdirectory1 && make -n and repeat...

One method to see all the calls to make is to temporarily rename /usr/bin/make to e.g. /usr/bin/make-original and create a script /usr/bin/make which logs all the calls to make to a file ${HOME}/makecalls.txt and calls the original make /usr/bin/make-original. That way you'll really get all the calls to make

# rename make
sudo mv /usr/bin/make /usr/bin/make-original
# create a script
cat <<'EOF' | sudo tee /usr/bin/make
echo "$(ps -o args= $PPID) ${@}" >> ${HOME}/makecalls.txt
/usr/bin/make-original "${@}"
EOF
# change the mode of the script same as make
sudo chmod --reference=/usr/bin/make-original /usr/bin/make

run yarn (or whatever scripts that you suspect them calling make):

#cd ~
#rm -rf volto
yo @plone/volto --volto=18.3.0 volto --skip-addons
cd volto
yarn

view the logged calls to make.
AFAICS there are only two calls to make: (1) omelette and (2) patches:

cat ${HOME}/makecalls.txt

    /usr/bin/node /home/map/volto/.yarn/releases/yarn-3.2.3.cjs omelette
    /usr/bin/node /home/map/volto/.yarn/releases/yarn-3.2.3.cjs patches

Therefore you could replace those calls (omelette and patches) by PowerShell calls and it should work. The code is in volto/Makefile:

.PHONY: omelette
omelette: ## Creates the omelette folder that contains a link to the installed version of Volto (a softlink pointing to node_modules/@plone/volto)
        if [ ! -d omelette ]; then ln -sf node_modules/@plone/volto omelette; fi

.PHONY: patches
patches:
        /bin/bash patches/patchit.sh > /dev/null 2>&1 ||true

Don't forget to rename back the original make

sudo rm -f /usr/bin/make
sudo mv /usr/bin/make-original /usr/bin/make
1 Like

AFAICS the patch doesn't apply to node_modules/razzle/config/createJestConfig.js current razzle (4.2.18).

@sneridagh Is the patch for the jest extender plugin still necessary for newer versions?

All mxmake base installs are running on Windows, given you have git installed (in order to have a bash) and make, see Getting started — mxmake 1.0 documentation
This part of the docs could need more details, PRs welcome.

As a reference, the integration tests are running on Windows-Runners in Github Actions mxmake/.github/workflows/variants.yml at main · mxstack/mxmake · GitHub

@Esoth isn't allowed to run make...

The root level Makefile does seem to be the only one for the project, which again is just that (possibly not needed) patch and the omelette directory which is just a symlink so I can easily do that.

Going off the hint in the error messages, it sounded like I need to install less-loader | webpack. I installed it with yarn, but I still get the "unexpected token" error message above.

For the backend, you can still install and run Plone using buildout. See Install Plone with Buildout — Plone Documentation v6 (the commands probably need some minor adjustments on Windows)

For Volto, I think it should be enough to run pnpm install, pnpm build, and pnpm start. (This is for Volto 18; older versions used yarn instead of pnpm.)

build (and start) with pnpm needs make too:

./package.json:12:    "build": "pnpm --filter @plone/volto build",
./package.json:13:    "start": "pnpm --filter @plone/volto start",
./packages/volto/package.json:39:    "start": "make build-deps && razzle start",
./packages/volto/package.json:41:    "build": "make build-deps && razzle build --noninteractive",

@sneridagh Could we change this so that building dependencies and starting volto is possible even if make isn't installed?

Just ran into this today. It must be a relatively recent thing for make not to be included by default on Linux…? (Ubuntu 24.04 LTS)

I believe this was in regards to Windows not having make

1 Like