Error "Command failed with exit code 1." when building 'siteSsr'

Hi,

I am trying to “Deploy apps stack using dev environment” by running yarn webiny deploy apps --env=dev and I always get this error “Command failed with exit code 1.” when building ‘siteSsr’.

yarn run v1.22.10
$ /Users/user/Documents/my-webiny-app/node_modules/.bin/webiny deploy apps --env=dev
  This is the first deploy of dev environment, so it may take a few minutes.
  💡 Loaded dev environment from <projectRoot>/.env.json.

  ✔ Great! Your MongoDB is accessible.

  webiny Collecting components from the template. +0ms
  webiny Executing the template's components graph. +28ms
  webiny:lambdaRole Creating role '8611896b_my-webiny-app_apps_dev_lambdaRole'. +0ms
  webiny:lambdaRole Role '8611896b_my-webiny-app_apps_dev_lambdaRole' was successfully deployed to region 'ap-southeast-1'. +22s
  webiny:databaseProxy Building 'databaseProxy' +0ms
  webiny:databaseProxy Finished building 'databaseProxy' +6s
  webiny:databaseProxy Starting deployment of lambda '8611896b_my-webiny-app_apps_dev_databaseProxy' to the 'ap-southeast-1' region. +317ms
  webiny:databaseProxy Packaging lambda code from './databaseProxy/build' +6ms
  webiny:databaseProxy Creating lambda '8611896b_my-webiny-app_apps_dev_databaseProxy' in the 'ap-southeast-1' region. +350ms
  webiny:databaseProxy Successfully deployed lambda '8611896b_my-webiny-app_apps_dev_databaseProxy' in the 'ap-southeast-1' region. +602ms
  webiny:siteSsr Building 'siteSsr' +0ms
  error Command failed with exit code 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I am using node JS v15.4.0 on macOS Catalina.

Any help is greatly appreciated.

Thank you.

Hi!

Can you try to run yarn build:dev in the apps/site? So we get a bit more errors out.

best regards,
Bruno

Hi Bruno,

Here is the error: “Cannot find module: ‘core-js/modules/es.symbol’. Make sure this package is installed.

yarn run v1.22.10
$ env-cmd -r .env.json --silent -e default webiny run build --env=dev --stack=api
  Creating an optimized production build...

● Site █████████████████████████ building (70%) 2/2 modules 0 active
 

Error: ./src/index.tsx
Cannot find module: 'core-js/modules/es.symbol'. Make sure this package is installed.

You can install this package by running: yarn add core-js/modules/es.symbol.
    at /Users/user/Documents/my-webiny-app/node_modules/@webiny/project-utils/bundling/app/createProdConfig.js:152:31
    at finalCallback (/Users/user/Documents/my-webiny-app/node_modules/webpack/lib/Compiler.js:257:39)
    at onCompiled (/Users/user/Documents/my-webiny-app/node_modules/webpack/lib/Compiler.js:265:20)
    at /Users/user/Documents/my-webiny-app/node_modules/webpack/lib/Compiler.js:670:21
    at eval (eval at create (/Users/user/Documents/my-webiny-app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:30:1)
    at /Users/user/Documents/my-webiny-app/node_modules/react-dev-utils/ModuleNotFoundPlugin.js:114:15
    at /Users/user/Documents/my-webiny-app/node_modules/webpack/lib/Compilation.js:1173:13
    at /Users/user/Documents/my-webiny-app/node_modules/webpack/lib/Compilation.js:1096:25
    at /Users/user/Documents/my-webiny-app/node_modules/webpack/lib/Compilation.js:1017:13
    at /Users/user/Documents/my-webiny-app/node_modules/neo-async/async.js:2830:7
    at /Users/user/Documents/my-webiny-app/node_modules/neo-async/async.js:2830:7
    at done (/Users/user/Documents/my-webiny-app/node_modules/neo-async/async.js:2863:11)
    at /Users/user/Documents/my-webiny-app/node_modules/neo-async/async.js:2818:7
    at /Users/user/Documents/my-webiny-app/node_modules/webpack/lib/Compilation.js:1017:13
    at /Users/user/Documents/my-webiny-app/node_modules/neo-async/async.js:2830:7
    at /Users/user/Documents/my-webiny-app/node_modules/neo-async/async.js:2830:7
  Failed to compile.
  
  ./src/index.tsx
  Cannot find module: 'core-js/modules/es.symbol'. Make sure this package is installed.

  You can install this package by running: yarn add core-js/modules/es.symbol.


error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

When I try to install the required package, it says:

yarn add v1.22.10
[1/4] 🔍  Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/core-js%2fmodules/es.symbol: Request \"https://registry.yarnpkg.com/core-js%2fmodules/es.symbol\" returned a 405".
info If you think this is a bug, please open a bug report with the information provided in "/Users/user/Documents/my-webiny-app/apps/site/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Thanks,
Leonardy

Hi,

It seems that some dependency->dependency is broken.
Put this into your apps/admin/package.json dependencies:

     "core-js": "3.8.2"

I have tested on node v15.6.0. Since AWS lambdas are run as node v12, maybe you should develop in the same version, just in case of something is different in packages between node versions.

Also, we are releasing Webiny v5 soon so you can check out the beta.
You can check how to install it here: https://v5--webiny-docs.netlify.app/docs/tutorials/install-webiny/
Docs are in the works so you will need to figure out things as you go. Or wait untill full v5 is released…

best regards,
Bruno

1 Like

Thanks a lot, Bruno!

It is now working fine.
And I installed the v5 beta, also working fine.
It’s time to dive in…

Regards,
Leonardy