Skip to content

[cloud-deploy-website-on-gke]: #41

@bigtime007

Description

@bigtime007

https://codelabs.developers.google.com/codelabs/cloud-deploy-website-on-gke#8
9. Make changes to the website
cd ~/monolith-to-microservices/react-app/src/pages/Home
mv index.js.new index.js
cat ~/monolith-to-microservices/react-app/src/pages/Home/index.js
cd ~/monolith-to-microservices/react-app
npm run build:monolith

Issue:

user@cloudshell:~/monolith-to-microservices/react-app (user-lab$ npm run build:monolith

[email protected] build:monolith
env-cmd -f .env.monolith react-scripts build

Creating an optimized production build...
(node:1842) Warning: require() of ES modules is not supported.
require() of /home/user/monolith-to-microservices/react-app/node_modules/@eslint/eslintrc/universal.js from /home/user/monolith-to-microservices/react-app/node_modules/eslint/lib/linter/linter.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename universal.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/user/monolith-to-microservices/react-app/node_modules/@eslint/eslintrc/package.json.
Failed to compile.

Failed to load plugin 'flowtype' declared in 'package.json » eslint-config-react-app': Cannot find module 'eslint/use-at-your-own-risk'
Require stack:

  • /home/user/monolith-to-microservices/react-app/node_modules/eslint-plugin-flowtype/dist/utilities/getBuiltinRule.js
  • /home/user/monolith-to-microservices/react-app/node_modules/eslint-plugin-flowtype/dist/rules/noUnusedExpressions.js
  • /home/user/monolith-to-microservices/react-app/node_modules/eslint-plugin-flowtype/dist/index.js
  • /home/user/monolith-to-microservices/react-app/node_modules/@eslint/eslintrc/dist/eslintrc.cjs

On Step "4" have user run: nvm install --lts prior to downloading the git package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions