Open MandelbrotianElliott opened 1 year ago
@MandelbrotianElliott we have deleted your original revision of this issue because your log output included a GitHub token (beginning with 443
and ending in 5e2
). You should immediately rotate the token and ensure that there has been no unexpected access using it.
Hi @MandelbrotianElliott 👋🏽 thanks for raising this issue. Can you try removing your node_modules
and any lock files and then try installing the packages again? Please let us know if this resolved the issue.
Hi @hloriana. Sorry, I should have specified. Before each new build I remove node_modules and lock files. The issue persists.
Hi @hloriana, Any status on this one?
Before opening, please confirm:
App Id
d2ig7fo3x6tt8i
AWS Region
us-west-2
Amplify Hosting feature
Frontend builds
Describe the bug
When the frontend build runs in amplify the yarn install runs fine (with some warnings), but the build fails with the error
Error: [BABEL] /codebuild/output/src914417544/src/app-dir/src/index.tsx: You gave us a visitor for the node type TSSatisfiesExpression but it's not a valid type
The repo builds locally using both yarn install -> yarn run build and npm install -> npm run build.
Locally there are the same warnings from yarn install, but the build produces no error and completes successfully. I've looked into the given error and it seems it's the result of a type mismatch between @babel/types versions, I've tried matching versions for all @babel/.... packages that the project uses but to no avail.
I've forced Amplify to use the same node and yarn versions that are being used locally but that also doesn't seem to be the cause.
package.json is as follows. Node version used is 14.17.2, yarn version is 1.22.19
{ "name": "@absolute-products/shopify-admin", "version": "0.1.0", "private": true, "dependencies": { "@ant-design/icons": "^4.6.2", "@babel/plugin-proposal-decorators": "^7.10.4", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.1", "@babel/plugin-proposal-optional-chaining": "^7.9.0", "@hot-loader/react-dom": "^16.13.0", "@nestjsx/crud-request": "^4.6.2", "@pa/common": "git+ssh://git@github.com/QCM-Media/product-app-common.git#master", "@shopify/app-bridge-react": "^1.21.4", "@shopify/polaris": "^4.22.0", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", "@testing-library/user-event": "^7.1.2", "@tinymce/tinymce-react": "^3.6.0", "@types/array-move": "^2.0.0", "@types/jest": "^24.0.0", "@types/js-cookie": "^2.2.6", "@types/moment": "^2.13.0", "@types/moment-timezone": "^0.5.13", "@types/node": "^15.12.2", "@types/react": "^16.9.0", "@types/react-beautiful-dnd": "^13.0.0", "@types/react-color": "^3.0.4", "@types/react-dom": "^16.9.0", "@types/react-router-dom": "^5.1.5", "@types/react-tag-input": "^6.1.2", "@types/react-toggle": "^4.0.2", "@types/react-transition-group": "^4.4.0", "@types/styled-components": "^5.1.0", "antd": "^4.16.2", "array-move": "^3.0.1", "babel-plugin-import": "^1.13.0", "cross-env": "^7.0.3", "customize-cra": "^1.0.0-alpha.0", "dequal": "^2.0.2", "dotenv-cli": "^4.0.0", "eslint": "^7.11.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-react": "^7.23.2", "eslint-plugin-react-hooks": "^4.2.0", "husky": "^4.3.8", "immutability-helper": "^3.1.1", "intersection-observer": "^0.10.0", "js-cookie": "^2.2.1", "less": "4.1.0", "less-loader": "7.2.1", "lint-staged": "^10.5.3", "moment": "^2.25.3", "moment-timezone": "^0.5.31", "nanoid": "^3.1.30", "node-sass": "^4.14.1", "prettier": "^2.2.1", "query-string": "^6.12.1", "rc-time-picker": "^3.7.3", "react": "^16.13.1", "react-app-rewire-hot-loader": "^2.0.1", "react-app-rewire-postcss": "^3.0.2", "react-app-rewired": "^2.1.6", "react-beautiful-dnd": "^13.0.0", "react-color": "^2.18.1", "react-dnd": "^14.0.2", "react-dnd-html5-backend": "^14.0.0", "react-dom": "^16.13.1", "react-error-boundary": "^3.1.0", "react-hot-loader": "^4.12.21", "react-router-dom": "^5.2.0", "react-scripts": "4.0.3", "react-sortable-hoc": "^2.0.0", "react-switch": "^5.0.1", "react-tag-input": "6.7.0", "react-toggle": "^4.1.1", "react-transition-group": "^4.4.1", "reflect-metadata": "^0.1.13", "styled-components": "^5.1.0", "tailwindcss": "^1.4.6", "typescript": "4.0.3" }, "scripts": { "start": "BROWSER=none PORT=3005 react-app-rewired start", "build": "react-app-rewired build", "build:staging": "dotenv -e .env.staging react-app-rewired build", "test": "react-app-rewired test", "ngrok": "ngrok http -hostname=ngrokhost 3005", "lint": "./node_modules/eslint/bin/eslint.js -c .eslintrc './src/**/*.ts' './src/**/*.tsx'", "lint:fix": "./node_modules/eslint/bin/eslint.js -c .eslintrc './src/**/*.ts' './src/**/*.tsx' --fix" }, "lint-staged": { "*.{js,jsx,ts,tsx}": [ "cross-env NODE_ENV=development ./node_modules/eslint/bin/eslint.js -c .eslintrc './src/**/*.ts' './src/**/*.tsx' --cache" ], "{*.json,.{babelrc,eslintrc,prettierrc}}": [ "prettier --ignore-path .eslintignore --parser json --write" ], "*.{css,scss}": [ "prettier --ignore-path .eslintignore --single-quote --write" ], "*.{html,md,yml}": [ "prettier --ignore-path .eslintignore --single-quote --write" ] }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] }, "husky": { "hooks": { "pre-commit": "lint-staged" } } }
Expected behavior
The app should build successfully
Reproduction steps
Build Settings
Log output
Additional information
No response