devowlio / wp-react-starter

🚀WordPress Plugin Boilerplate using modern web techs like TypeScript, SASS, and so on... on top of a local development environment with Docker and predefined GitLab CI for continous integration and deployment!
https://devowl.io/wp-react-starter/
Other
387 stars 51 forks source link

"result.flat" is not a function error when starting the boilerplate containers. #31

Closed AbdiTolesa closed 1 year ago

AbdiTolesa commented 3 years ago

Hello there,

I face the following error trying to start the boilerplate.

` yarn docker:start yarn run v1.22.5 $ yarn docker-compose up --build -d && concurrently --raw "yarn docker-compose logs -f -t --tail=10" "yarn --silent wp-wait && yarn --silent docker:start:dev" $ PLUGIN_SLUGS=$(yarn --silent workspace:slugs) COMPOSE_PATH_SEPARATOR=: COMPOSE_FILE=./devops/docker-compose/docker-compose.yml:./devops/docker-compose/docker-compose.local.yml:$(COMPOSE_CONTEXT=local yarn --silent workspace:compose-files) COMPOSE_PROJECT_NAME=${npm_package_name} yarn --silent exposedotenv docker-compose up --build -d my-wp-react-boilerplate_mysql_1 is up-to-date my-wp-react-boilerplate_dockerhost_1 is up-to-date my-wp-react-boilerplate_phpmyadmin_1 is up-to-date my-wp-react-boilerplate_wordpress_1 is up-to-date Starting my-wp-react-boilerplate_wordpress-cli_1 ... done $ PLUGIN_SLUGS=$(yarn --silent workspace:slugs) COMPOSE_PATH_SEPARATOR=: COMPOSE_FILE=./devops/docker-compose/docker-compose.yml:./devops/docker-compose/docker-compose.local.yml:$(COMPOSE_CONTEXT=local yarn --silent workspace:compose-files) COMPOSE_PROJECT_NAME=${npm_package_name} yarn --silent exposedotenv docker-compose logs -f -t --tail=10 Attaching to my-wp-react-boilerplate_wordpress-cli_1, my-wp-react-boilerplate_phpmyadmin_1, my-wp-react-boilerplate_wordpress_1, my-wp-react-boilerplate_mysql_1, my-wp-react-boilerplate_dockerhost_1 dockerhost_1 | 2021-03-08T11:37:06.351133837Z Docker Host: 172.20.0.1 (default gateway) dockerhost_1 | 2021-03-08T11:37:06.351503057Z Forwarding ports: 0:65535 mysql_1 | 2021-03-08T11:37:12.736832699Z 2021-03-08 11:37:12 0 [Note] InnoDB: 10.3.28 started; log sequence number 1625452; transaction id 20 mysql_1 | 2021-03-08T11:37:12.736975586Z 2021-03-08 11:37:12 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool mysql_1 | 2021-03-08T11:37:12.737137890Z 2021-03-08 11:37:12 0 [Note] Plugin 'FEEDBACK' is disabled. mysql_1 | 2021-03-08T11:37:12.742398914Z 2021-03-08 11:37:12 0 [Note] Server socket created on IP: '::'. mysql_1 | 2021-03-08T11:37:12.743170186Z 2021-03-08 11:37:12 0 [Warning] 'proxies_priv' entry '@% root@79d808ba5a88' ignored in --skip-name-resolve mode. mysql_1 | 2021-03-08T11:37:12.743421667Z 2021-03-08 11:37:12 0 [Note] InnoDB: Buffer pool(s) load completed at 210308 11:37:12 mysql_1 | 2021-03-08T11:37:12.744041206Z 2021-03-08 11:37:12 0 [Note] Reading of all Master_info entries succeeded mysql_1 | 2021-03-08T11:37:12.744055162Z 2021-03-08 11:37:12 0 [Note] Added new Master_info '' to hash table mysql_1 | 2021-03-08T11:37:12.744058689Z 2021-03-08 11:37:12 0 [Note] mysqld: ready for connections. mysql_1 | 2021-03-08T11:37:12.744061444Z Version: '10.3.28-MariaDB-1:10.3.28+maria~focal' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution phpmyadmin_1 | 2021-03-08T11:37:06.818718154Z AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.20.0.4. Set the 'ServerName' directive globally to suppress this message phpmyadmin_1 | 2021-03-08T11:37:06.830750265Z AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.20.0.4. Set the 'ServerName' directive globally to suppress this message phpmyadmin_1 | 2021-03-08T11:37:06.843405815Z [Mon Mar 08 11:37:06.843211 2021] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.4.15 configured -- resuming normal operations phpmyadmin_1 | 2021-03-08T11:37:06.843431743Z [Mon Mar 08 11:37:06.843257 2021] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND' wordpress_1 | 2021-03-08T11:37:27.382903258Z Success: WordPress updated successfully. wordpress_1 | 2021-03-08T11:37:27.388648347Z Chown www-data... wordpress_1 | 2021-03-08T11:37:27.390425301Z Chown www-data done! wordpress_1 | 2021-03-08T11:37:27.426634549Z AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.20.0.5. Set the 'ServerName' directive globally to suppress this message wordpress_1 | 2021-03-08T11:37:27.437784651Z AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.20.0.5. Set the 'ServerName' directive globally to suppress this message wordpress_1 | 2021-03-08T11:37:27.449839716Z [Mon Mar 08 11:37:27.449711 2021] [mpm_prefork:notice] [pid 746] AH00163: Apache/2.4.38 (Debian) PHP/7.3.17 configured -- resuming normal operations wordpress_1 | 2021-03-08T11:37:27.449864833Z [Mon Mar 08 11:37:27.449772 2021] [core:notice] [pid 746] AH00094: Command line: 'apache2 -D FOREGROUND' wordpress_1 | 2021-03-08T11:37:28.313204814Z 127.0.0.1 - - [08/Mar/2021:11:37:28 +0000] "GET /wp-json/my-reactive-plugin/v1/plugin HTTP/1.1" 200 741 "-" "curl/7.64.0" wordpress_1 | 2021-03-08T11:38:32.945742966Z 127.0.0.1 - - [08/Mar/2021:11:38:32 +0000] "GET /wp-json/my-reactive-plugin/v1/plugin HTTP/1.1" 200 741 "-" "curl/7.64.0" wordpress_1 | 2021-03-08T11:40:05.100071447Z 127.0.0.1 - - [08/Mar/2021:11:40:05 +0000] "GET /wp-json/my-reactive-plugin/v1/plugin HTTP/1.1" 200 741 "-" "curl/7.64.0" my-wp-react-boilerplate_wordpress-cli_1 exited with code 0 wordpress_1 | 2021-03-08T11:40:26.481860944Z 127.0.0.1 - - [08/Mar/2021:11:40:26 +0000] "GET /wp-json/my-reactive-plugin/v1/plugin HTTP/1.1" 200 741 "-" "curl/7.64.0" $ /opt/apps/wordpress/my-wp-react-boilerplate/node_modules/.bin/parallel-webpack --no-stats --config common/webpack.multi.ts --watch $ concurrently --raw "test $IS_DOCKER_START_COMMAND && exit 0 || yarn webpack --watch" "yarn --silent chokidar 'src/*/.php' -c 'yarn i18n:generate:backend' --silent" $ yarn grunt libs:copy && concurrently --raw "test $IS_DOCKER_START_COMMAND && exit 0 || yarn webpack --watch" "yarn --silent chokidar 'src/inc/*/.php' -i 'src/inc/base/others/cachebuster*' -c 'yarn i18n:generate:backend' --silent" $ grunt --gruntfile scripts/Gruntfile.ts --base . libs:copy Running "clean:npmLibs" (clean) task

3 paths cleaned.

Running "copy:npmLibs" (copy) task

Running "copy:npmLibsHoist" (copy) task Copied 9 files

Running "node_modules_cachebuster:publiclib" (node_modules_cachebuster) task Generating node modules cachebuster file "src/inc/base/others/cachebuster-lib.php"...OK

Done. result.flat is not a function error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

^CERROR: Aborting.

`

Thanks in advance for your support.

azterix commented 3 years ago

I ran into this as well.

result.flat isn't added into nodejs until v 11 and up. I bumped my node version to the latest (15.13.0 when I wrote this) and initial testing is going ok. First few hours with this project so YMMV