I made a WordPress plugin with 3 blocks. The package.json looks like this:
"scripts": {
"build": "wp-scripts build",
"format": "wp-scripts format",
"lint:css": "wp-scripts lint-style",
"lint:js": "wp-scripts lint-js",
"start": "wp-scripts start",
"packages-update": "wp-scripts packages-update",
"build:review-box": "wp-scripts build blocks/review-box/src/index.js --output-path=blocks/review-box/build/",
"start:review-box": "wp-scripts start blocks/review-box/src/index.js --output-path=blocks/review-box/build/",
"build:random-game": "wp-scripts build blocks/random-game/src/index.js --output-path=blocks/random-game/build/",
"start:random-game": "wp-scripts start blocks/random-game/src/index.js --output-path=blocks/random-game/build/",
"build:game-list": "wp-scripts build blocks/game-list/src/index.js --output-path=blocks/game-list/build/",
"start:game-list": "wp-scripts start blocks/game-list/src/index.js --output-path=blocks/game-list/build/"
},
"dependencies": {
"@wordpress/block-editor": "^8.0.13",
"@wordpress/blocks": "^11.1.5",
"@wordpress/i18n": "^4.2.4"
},
"devDependencies": {
"@wordpress/scripts": "^19.2.2"
}
When I run this:
npm run start:random-game
I only see this output and nothing else:
> game-review@0.1.0 start:random-game
> wp-scripts start blocks/random-game/src/index.js --output-path=blocks/random-game/build/
Before I could use npm run start:random-game or npm run build:game-list to build and run the script for each blog and something like this happened:
asset index.js 2.93 KiB [emitted] [minimized] (name: index)
asset index.asset.php 192 bytes [emitted] (name: index)
Entrypoint index 3.12 KiB = index.js 2.93 KiB index.asset.php 192 bytes
This worked fine with before, and works great with any other Gutenberg plugin right now. What am I missing? I tried "npm install @wordpress/scripts –save-dev" to fix this but something seems broken. This is the repository: https://github.com/mtoensing/game-review-block