npm ERR! Failed at the [email protected] bundle script.
Issue Overview
I ran npm run bundle today and couldn't get wprig to build on my laptop. I quickly installed the theme on my deskop and tried to do it with a fresh install and got the same error.
Here is what it showed in my console: `[11:33:39] gulp-imagemin: Minified 1 image (saved 20 B - 22.7%) [11:33:42] 'scripts' errored after 6.08 s [11:33:42] SyntaxError in plugin "gulp-babel" Message: /home/bobbyx/wp-local-docker-sites/techhaus-test/wordpress/wp-content/themes/wprig-th/assets/js/src/navigation.js: Unexpected token, expected "," (195:46)
193 | parentMenuItem.classList.remove( 'menu-item--toggled-on' ); 194 | subMenu.classList.remove( 'toggle-show' );
195 | toggleButton.setAttribute( 'aria-label', tH RigScreenReaderText.expand ); | ^ 196 | 197 | // Make sure all children are closed. 198 | const subMenuItemsToggled = parentMenuItem.querySelectorAll( '.menu-item--toggled-on' ); [11:33:42] 'bundleTheme' errored after 6.15 s [11:33:42] The following tasks did not complete: php,
, images, styles [11:33:42] Did you forget to signal async completion? npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] bundle: cross-env NODE_ENV=production gulp bundleThemenpm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] bundle script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:`
Obviously I'm having formatting problems above, sorry.
The error log looks like:
'0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'bundle' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebundle', 'bundle', 'postbundle' ]
5 info lifecycle [email protected]~prebundle: [email protected]
6 info lifecycle [email protected]~bundle: [email protected]
7 verbose lifecycle [email protected]~bundle: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~bundle: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/bobbyx/wp-local-docker-sites/techhaus-test/wordpress/wp-content/themes/wprig-th/node_modules/.bin:/home/bobbyx/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin
9 verbose lifecycle [email protected]~bundle: CWD: /home/bobbyx/wp-local-docker-sites/techhaus-test/wordpress/wp-content/themes/wprig-th
10 silly lifecycle [email protected]~bundle: Args: [ '-c', 'cross-env NODE_ENV=production gulp bundleTheme' ]
11 silly lifecycle [email protected]~bundle: Returned: code: 1 signal: null
12 info lifecycle [email protected]~bundle: Failed to exec bundle script
13 verbose stack Error: [email protected] bundle: cross-env NODE_ENV=production gulp bundleTheme
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.cross-env NODE_ENV=production gulp bundleTheme
22 error Exit status 1
23 error Failed at the [email protected] bundle script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
'
Describe your environment
Manjaro Linux on Thinkpad -> WP Local Docker -> WP Rig Manjaro Linux on Workstation -> Local -> WP Rig
Pretty barebones.
Thanks for any help. This theme is such a great learning tool for me.
Bobby
What is the purpose of the tH before RigScreenReaderText.expand on line 195 of navigation.js?