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.