does the interface parameter name must be the same with model namespaces in react - reactjs

I am defined the functional properties in model like this:
export interface IIapProductProps {
iapproducts: IIapProductState,
dispatch: Dispatch
loading: boolean
}
and this is the model:
interface IIapProductModel {
namespace: 'iapproduct'
state: IIapProductState
reducers: {
getPage: Reducer<IIapProductState>,
getList: Reducer<IIapProductState>,
edit:Reducer<IIapProductState>,
add: Reducer<IIapProductState>,
}
effects: {
getIapProductPage: Effect,
getProductList: Effect,
editProduct: Effect,
addProduct: Effect
}
subscriptions: {
setup: Subscription
}
}
does the IIapProductProps first parameter name must be the same with the namespace's name? I found when I changed the namespace to iapproduct, the properties iapproducts must be the same with the model namespace. this is the package.json:
{
"name": "ant-design-pro",
"version": "5.2.0",
"private": true,
"description": "An out-of-box UI solution for enterprise applications",
"scripts": {
"analyze": "cross-env ANALYZE=1 umi build",
"build": "umi build",
"deploy": "npm run build && npm run gh-pages",
"dev": "npm run start:dev",
"gh-pages": "gh-pages -d dist",
"i18n-remove": "pro i18n-remove --locale=zh-CN --write",
"postinstall": "umi g tmp",
"lint": "umi g tmp && npm run lint:js && npm run lint:style && npm run lint:prettier && npm run tsc",
"lint-staged": "lint-staged",
"lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx ",
"lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src && npm run lint:style",
"lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src",
"lint:prettier": "prettier -c --write \"src/**/*\" --end-of-line auto",
"lint:style": "stylelint --fix \"src/**/*.less\" --syntax less",
"openapi": "umi openapi",
"playwright": "playwright install && playwright test",
"precommit": "lint-staged",
"prettier": "prettier -c --write \"src/**/*\"",
"serve": "umi-serve",
"start": "cross-env UMI_ENV=dev umi dev",
"start:dev": "cross-env REACT_APP_ENV=dev MOCK=none UMI_ENV=dev umi dev",
"start:no-mock": "cross-env MOCK=none UMI_ENV=dev umi dev",
"start:no-ui": "cross-env UMI_UI=none UMI_ENV=dev umi dev",
"start:pre": "cross-env REACT_APP_ENV=pre UMI_ENV=dev umi dev",
"start:test": "cross-env REACT_APP_ENV=test MOCK=none UMI_ENV=dev umi dev",
"test": "umi test",
"test:component": "umi test ./src/components",
"test:e2e": "node ./tests/run-tests.js",
"tsc": "tsc --noEmit"
},
"lint-staged": {
"**/*.less": "stylelint --syntax less",
"**/*.{js,jsx,ts,tsx}": "npm run lint-staged:js",
"**/*.{js,jsx,tsx,ts,less,md,json}": [
"prettier --write"
]
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 10"
],
"dependencies": {
"#ant-design/icons": "^4.7.0",
"#ant-design/pro-components": "^1.1.14",
"#ant-design/pro-descriptions": "^1.10.0",
"#ant-design/pro-form": "^1.52.0",
"#ant-design/pro-layout": "^6.32.0",
"#ant-design/pro-table": "2.72.1",
"#loadable/component": "^5.15.2",
"#types/crypto-js": "^4.1.1",
"#types/react-loadable": "^5.5.6",
"#umijs/route-utils": "^2.0.0",
"antd": "^4.17.0",
"classnames": "^2.3.0",
"crypto-js": "^4.1.1",
"dayjs": "^1.11.1",
"echarts": "^5.3.3",
"echarts-for-react": "^3.0.2",
"js-wheel": "https://github.com/jiangxiaoqiang/js-wheel.git",
"lodash": "^4.17.0",
"moment": "^2.29.0",
"omit.js": "^2.0.2",
"rc-menu": "^9.1.0",
"rc-util": "^5.16.0",
"react": "^17.0.0",
"react-dev-inspector": "^1.7.0",
"react-dom": "^17.0.0",
"react-helmet-async": "^1.2.0",
"react-loadable": "^5.5.0",
"react-native-aes-crypto": "^2.1.0",
"react-router": "^6.3.0",
"react-router-dom": "^6.3.0",
"umi": "3.5.0",
"umi-request": "^1.4.0",
"uuid": "^8.3.2"
},
"devDependencies": {
"#ant-design/pro-cli": "^2.1.0",
"#playwright/test": "^1.17.0",
"#types/express": "^4.17.0",
"#types/history": "^4.7.0",
"#types/jest": "^26.0.0",
"#types/lodash": "^4.14.0",
"#types/react": "^17.0.0",
"#types/react-dom": "^17.0.0",
"#types/react-helmet": "^6.1.0",
"#types/react-router": "^5.1.18",
"#types/react-router-dom": "^5.3.3",
"#umijs/fabric": "^2.8.0",
"#umijs/openapi": "^1.3.0",
"#umijs/plugin-blocks": "^2.2.0",
"#umijs/plugin-esbuild": "^1.4.0",
"#umijs/plugin-openapi": "^1.3.0",
"#umijs/preset-ant-design-pro": "^1.3.0",
"#umijs/preset-dumi": "^1.1.0",
"#umijs/preset-react": "^1.8.17",
"#umijs/yorkie": "^2.0.5",
"carlo": "^0.9.46",
"cross-env": "^7.0.0",
"cross-port-killer": "^1.3.0",
"detect-installer": "^1.0.0",
"enzyme": "^3.11.0",
"eslint": "^7.32.0",
"express": "^4.17.0",
"gh-pages": "^3.2.0",
"jsdom-global": "^3.0.0",
"lint-staged": "^10.0.0",
"mockjs": "^1.1.0",
"prettier": "^2.5.0",
"puppeteer-core": "^8.0.0",
"stylelint": "^13.0.0",
"swagger-ui-react": "^4.12.0",
"typescript": "^4.5.0",
"umi-serve": "^1.9.10"
},
"engines": {
"node": ">=10.0.0"
},
"gitHooks": {
"commit-msg": "fabric verify-commit"
}
}

Related

stylelint ignoreFiles not working includes the ignored files paths always

In the stylelint config file, I have added the ignoreFiles array. but on pre-commit it's throwing the error from ignored file path.
here is my stylelint.config.cjs:
/*eslint-env node*/
module.exports = {
extends: [
'stylelint-config-standard',
'stylelint-config-css-modules',
'stylelint-config-prettier',
'stylelint-config-standard-scss',
'stylelint-config-recommended-scss',
],
plugins: ['stylelint-scss'],
rules: {
'at-rule-no-unknown': [
true,
{
ignoreAtRules: [
'tailwind',
'apply',
'screen',
'variants',
'responsive',
],
},
],
'no-duplicate-selectors': null,
'no-missing-end-of-source-newline': null,
'no-empty-source': null,
'rule-empty-line-before': null,
'comment-empty-line-before': null,
'selector-pseudo-element-no-unknown': null,
'declaration-block-trailing-semicolon': null,
'no-descending-specificity': null,
'string-no-newline': null,
'selector-max-universal': 1,
'selector-class-pattern': '^[a-z][a-zA-Z0-9]+$',
'scss/dollar-variable-colon-space-before': 'never',
'scss/dollar-variable-colon-space-after': 'always',
'scss/dollar-variable-no-missing-interpolation': true,
'scss/dollar-variable-pattern': /^[a-z]+$/,
'scss/double-slash-comment-whitespace-inside': 'always',
'scss/operator-no-newline-before': true,
'scss/selector-no-redundant-nesting-selector': true,
'scss/at-rule-no-unknown': null,
},
ignoreFiles: ['node_modules/**/*.css', 'dist/**/*.css', 'coverage/**/*.css'],
};
when run the pre-commit hook, getting error under the coverage, dist folder.
here is my package.json:
{
"name": "store-app",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"start": "nx serve",
"build": "nx build",
"test": "nx test",
"test:unit": "vitest --environment jsdom",
"test:unit:coverage": "vitest run --coverage --environment jsdom",
"prettier:fix": "prettier --config ./prettier.config.cjs --write ./**/src/**/*.{css,scss,ts,tsx}",
"prettier:check": "prettier --config ./prettier.config.cjs --check ./**/src/**/*.{css,scss,ts,tsx}`",
"lint": "eslint . --ext .js, .jsx, .cjs,.mjs --fix --ignore-path .gitignore",
"lint:fix": "npm run lint -- --fix",
"prepare": "husky install",
"stylelint": "npx stylelint \"./**/*.{css,scss,sass}\" --config \"./stylelint.config.cjs\"",
"stylint:fix": "npm run stylelint -- --fix"
},
"private": true,
"devDependencies": {
"#babel/preset-react": "^7.14.5",
"#nrwl/eslint-plugin-nx": "15.6.3",
"#nrwl/linter": "15.6.3",
"#nrwl/react": "15.6.3",
"#nrwl/vite": "15.6.3",
"#nrwl/workspace": "15.6.3",
"#rushstack/eslint-patch": "^1.2.0",
"#testing-library/jest-dom": "^5.16.5",
"#testing-library/react": "13.4.0",
"#types/node": "18.11.9",
"#types/react": "18.0.25",
"#types/react-dom": "18.0.9",
"#typescript-eslint/eslint-plugin": "^5.36.1",
"#typescript-eslint/parser": "^5.36.1",
"#vitejs/plugin-react": "^3.0.0",
"#vitest/coverage-c8": "~0.25.8",
"#vitest/ui": "^0.25.8",
"autoprefixer": "10.4.13",
"eslint": "~8.15.0",
"eslint-config-prettier": "8.1.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jsx-a11y": "6.6.1",
"eslint-plugin-react": "7.31.11",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-vitest-globals": "^1.3.1",
"husky": "^8.0.3",
"i": "^0.3.7",
"jsdom": "~20.0.3",
"npm": "^9.5.0",
"nx": "^15.6.3",
"postcss": "^8.4.21",
"postcss-extend": "^1.0.5",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-import": "^15.1.0",
"postcss-mixins": "^9.0.4",
"postcss-nested": "^6.0.0",
"postcss-preset-env": "^8.0.1",
"postcss-reporter": "^7.0.5",
"prettier": "^2.8.4",
"react-test-renderer": "18.2.0",
"sass": "^1.55.0",
"stylelint": "^14.16.1",
"stylelint-config-css-modules": "^4.2.0",
"stylelint-config-prettier": "^9.0.5",
"stylelint-config-recommended": "^9.0.0",
"stylelint-config-recommended-scss": "8.00",
"stylelint-config-standard": "^29.0.0",
"stylelint-config-standard-scss": "^6.1.0",
"stylelint-scss": "^4.3.0",
"tailwindcss": "3.2.4",
"typescript": "~4.8.2",
"vite": "^4.0.1",
"vite-plugin-dts": "~1.7.1",
"vite-plugin-eslint": "^1.8.1",
"vite-tsconfig-paths": "^4.0.2",
"vitest": "^0.25.8"
},
"dependencies": {
"react": "18.2.0",
"react-dom": "18.2.0",
"tslib": "^2.3.0"
},
"lint-staged": {
"./**/src/*.{js,jsx,ts,tsx}": "npx nx lint",
"./**/src/*.{css,scss,sass}": "npm run stylelint",
"./**/src/*.{js,jsx,ts,tsx,json,css,scss,md}": "prettier -w -u"
}
}

Next.js not friendly when checking with google mobile-friendly

My site is not mobile friendly when testing with Google Mobile friendly. But actually when accessing it, it is mobile friendly.
What should I do to fix it? I am using Next.js.
Result when I test: https://search.google.com/test/mobile-friendly/result?id=zwleJJ0VXRiIwFagHtBHuA
My package.json:
{
"name": "tintuc",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev -p 8080",
"build": "next build",
"start": "next start -p 8080",
"sitemap": "next-sitemap",
"analyze": "cross-env ANALYZE=true next build",
"analyze:server": "cross-env BUNDLE_ANALYZE=server next build",
"analyze:browser": "cross-env BUNDLE_ANALYZE=browser next build",
"find:unused": "next-unused",
"depcheck": "npx depcheck"
},
"dependencies": {
"#apollo/client": "^3.3.19",
"#headlessui/react": "^1.4.1",
"#heroicons/react": "^1.0.4",
"date-fns": "^2.25.0",
"deepmerge": "^4.2.2",
"graphql": "^15.5.0",
"highlight.js": "^11.6.0",
"html-react-parser": "^3.0.4",
"lodash": "^4.17.21",
"next": "^12.2.5",
"next-seo": "^4.28.1",
"node-html-parser": "^5.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-loading-skeleton": "^2.2.0",
"replace-special-characters": "^1.2.6"
},
"devDependencies": {
"#next/bundle-analyzer": "^11.1.4",
"#types/node": "^18.11.0",
"#types/react": "^18.0.21",
"autoprefixer": "^10.3.6",
"next-pwa": "^5.6.0",
"next-sitemap": "^3.1.29",
"next-unused": "^0.0.6",
"postcss": "^8.3.8",
"tailwindcss": "^2.2.16"
}
}

Deploying Google App Engine Nest.js via Bitbucket Pipelines

In my current setup, I use Bitbucket Pipelines to deploy a Nest.js backend to Google App Engine. Unfortunately, I haven't gotten my NestJS backend up and running yet. Before I had the same setup with a simple Express.js backend which worked without problems.
The problem is as follows and I am now at a loss as to what else to try:
Here's my bitbucket-pipelines.yaml:
image: node:16.15.0
pipelines:
branches:
master:
- step:
name: Install Dependencies & Build Application
script:
- npm install
- npm run build
- step:
name: Deploy to Google App Engine
deployment: development
script:
- pipe: atlassian/google-app-engine-deploy:1.0.0
variables:
KEY_FILE: $KEY_FILE
PROJECT: 'example-project'
VERSION: 'development'
DEPLOYABLES: 'default.yaml'
STOP_PREVIOUS_VERSION: 'true'
Here's my package.json:
{
"name": "example-project",
"version": "0.0.1",
"description": "",
"author": "",
"private": true,
"license": "UNLICENSED",
"scripts": {
"prebuild": "rimraf dist",
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "NODE_ENV=production node dist/main",
"start:dev": "NODE_ENV=development nest start --watch",
"start:stage": "NODE_ENV=stage nest start --watch",
"start:release": "NODE_ENV=release nest start --watch",
"start:prod": "NODE_ENV=production node dist/main",
"start:debug": "nest start --debug --watch",
"db": "../../cloud_sql_proxy -instances=example-project=tcp:3306",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json"
},
"dependencies": {
"#hapi/joi": "^17.1.1",
"#nestjs/cli": "^8.0.0",
"#nestjs/common": "^8.0.0",
"#nestjs/config": "^2.0.0",
"#nestjs/core": "^8.0.0",
"#nestjs/mapped-types": "^1.0.1",
"#nestjs/platform-express": "^8.0.0",
"#nestjs/typeorm": "^8.0.3",
"buffer-to-stream": "^1.0.0",
"class-transformer": "^0.5.1",
"class-validator": "^0.13.2",
"cloudinary": "^1.30.0",
"firebase-admin": "^10.2.0",
"module-alias": "^2.2.2",
"mysql": "^2.18.1",
"pg": "^8.7.3",
"portfinder": "^1.0.28",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^7.2.0",
"typeorm": "^0.2.45",
"typeorm-naming-strategies": "^4.1.0"
},
"devDependencies": {
"#nestjs/schematics": "^8.0.0",
"#nestjs/testing": "^8.0.0",
"#types/express": "^4.17.13",
"#types/hapi__joi": "^17.1.8",
"#types/jest": "27.4.1",
"#types/multer": "^1.4.7",
"#types/node": "^16.0.0",
"#types/supertest": "^2.0.11",
"#typescript-eslint/eslint-plugin": "^5.0.0",
"#typescript-eslint/parser": "^5.0.0",
"eslint": "^8.0.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^27.2.5",
"prettier": "^2.3.2",
"source-map-support": "^0.5.20",
"supertest": "^6.1.3",
"ts-jest": "^27.0.3",
"ts-loader": "^9.2.3",
"ts-node": "^10.0.0",
"tsconfig-paths": "^3.10.1",
"typescript": "^4.3.5"
},
"jest": {
"moduleFileExtensions": [
"js",
"json",
"ts"
],
"rootDir": "src",
"testRegex": ".*\\.spec\\.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"collectCoverageFrom": [
"**/*.(t|j)s"
],
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
}
Maybe someone has already made experiences with this stack and can help me.

sh: 1: react-app-rewired: not found when building Dockerfile

I'm getting the following error when trying to build a Create React App v5.0.1 using node 16.15.0 on docker.
It was working fine using node 14.17.0, but due to a failure when I was starting the project in this version I needed to update to node 16.15.0 and now it's failing and I have no clue why, because if I run npm run build outside docker it works well :(
react-app-rewired --max-old-space-size=8192 build sh: 1: react-app-rewired: not found
Dockerfile
FROM node:16.15.0
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . /usr/src/app
RUN npm install --legacy-peer-deps
RUN ls -lrt
RUN npm i serve -g
EXPOSE 80
ENV NODE_ENV=production
RUN npm run build
ENTRYPOINT [ "sh","bootstrap.sh"]
My package.json
{
"name": "harvest-front",
"version": "1.7.4",
"private": true,
"dependencies": {
"#ant-design/icons": "^4.7.0",
"#fortawesome/fontawesome-svg-core": "^1.2.22",
"#fortawesome/free-solid-svg-icons": "^5.10.2",
"#fortawesome/react-fontawesome": "^0.1.4",
"#types/jest": "^27.4.1",
"#types/node": "^17.0.23",
"#types/react": "^17.0.43",
"#types/react-dom": "^17.0.14",
"antd": "^4.20.7",
"apexcharts": "^3.19.2",
"apisauce": "^1.1.0",
"connected-react-router": "^6.5.2",
"dotenv": "^10.0.0",
"formik": "^2.2.9",
"har-validator": "^5.1.5",
"history": "4.10.1",
"js-file-download": "^0.4.9",
"leaflet": "^1.7.1",
"lodash": "^4.17.21",
"moment": "^2.22.2",
"moment-timezone": "^0.5.33",
"papaparse": "^5.2.0",
"password-validator": "^5.0.2",
"prop-types": "^15.6.2",
"query-string": "^6.8.3",
"react": "^17.0.2",
"react-apexcharts": "^1.3.7",
"react-clear-cache": "^1.4.12",
"react-custom-scrollbars": "^4.2.1",
"react-dom": "npm:#hot-loader/react-dom#^17.0.2",
"react-error-boundary": "^3.1.4",
"react-intl": "^2.4.0",
"react-leaflet": "2.8.0",
"react-number-format": "^4.3.1",
"react-redux": "^7.0.2",
"react-router-dom": "^5.2.0",
"react-scripts": "5.0.1",
"redis": "^3.1.2",
"redux": "^4.0.1",
"redux-persist": "^6.0.0",
"redux-saga": "^1.0.2",
"source-map-explorer": "^2.5.2",
"typescript": "^4.6.3",
"url-search-params": "^1.1.0",
"xlsx": "^0.18.5",
"yup": "^0.32.11"
},
"resolutions": {
"moment": "2.24.0",
"antd": "4.2.4",
"immer": "9.0.6",
"property-expr": "2.0.3",
"ansi-html": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz",
"glob-parent": "6.0.1",
"styled-components": "^5"
},
"scripts": {
"prebuild": "npm install react-dom#17.0.2 --save --legacy-peer-deps",
"sonar": "node sonar-project.js",
"start": "react-app-rewired start",
"start::dev": "env-cmd -e dev react-app-rewired start",
"start::qa": "env-cmd -e qa react-app-rewired start",
"start::np": "env-cmd -e np react-app-rewired start",
"build": "react-app-rewired --max-old-space-size=8192 build",
"test": "react-app-rewired test",
"test::ci": "react-app-rewired test --coverage=false --ci --watchAll=false --collectCoverageFrom=src/**/*.js --collectCoverageFrom=!src/assets/**/*.js",
"qa": "PORT=8081 react-scripts start",
"cy::op": "cypress open",
"cy::ru": "cypress run",
"lint": "eslint --max-warnings 0 --ignore-path .gitignore --fix --ext .js,.jsx,.ts,.tsx src",
"prettier": "prettier --ignore-path .gitignore \"**/*.+(js|json)\"",
"format": "yarn run prettier -- --write",
"check-format": "yarn run prettier -- --list-different",
"validate": "yarn run lint && yarn run test --watchAll --bail",
"createJob": "node ci/createJob.js",
"deleteJob": "node ci/deleteJob.js",
"checkEnvironment": "node ci/checkEnvironment.js",
"cm": "cz",
"analyze": "source-map-explorer 'build/static/js/*.js'",
"generate:gc": "plop --plopfile ./generators/globalComponent.js"
},
"devDependencies": {
"#babel/plugin-proposal-class-properties": "^7.16.0",
"#babel/plugin-proposal-private-methods": "^7.14.5",
"#babel/plugin-proposal-private-property-in-object": "^7.15.4",
"#babel/preset-typescript": "^7.16.7",
"#commitlint/cli": "^16.0.2",
"#commitlint/config-conventional": "^16.0.0",
"#testing-library/cypress": "^8.0.1",
"#testing-library/dom": "^8.5.0",
"#testing-library/jest-dom": "^5.14.1",
"#testing-library/react": "^12.1.0",
"#testing-library/react-hooks": "^7.0.2",
"#testing-library/user-event": "^13.3.0",
"#types/lodash": "^4.14.182",
"#types/react-router-dom": "^5.3.3",
"#types/styled-components": "^5.1.24",
"#types/yup": "^0.29.13",
"#typescript-eslint/eslint-plugin": "^5.18.0",
"#typescript-eslint/parser": "^5.18.0",
"babel-eslint": "^10.1.0",
"babel-plugin-styled-components": "^2.0.6",
"commitizen": "^4.2.4",
"customize-cra": "^1.0.0",
"customize-cra-less-loader": "^2.0.0",
"cypress": "9.5.2",
"cypress-file-upload": "^5.0.8",
"cypress-mochawesome-reporter": "^2.3.0",
"cz-conventional-changelog": "^3.3.0",
"env-cmd": "^10.1.0",
"eslint": "^7.11.0",
"eslint-config-prettier": "^6.9.0",
"eslint-plugin-jest-dom": "^3.9.2",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.29.3",
"eslint-plugin-sonarjs": "^0.6.0",
"eslint-plugin-testing-library": "^4.12.2",
"husky": "^4.2.3",
"jest-axe": "^5.0.1",
"jest-styled-components": "^7.0.8",
"less": "^4.1.2",
"less-loader": "^10.2.0",
"less-vars-to-js": "^1.3.0",
"lint-staged": "^11.1.2",
"plop": "^3.0.5",
"postcss-normalize": "^10.0.1",
"prettier": "^2.3.0",
"react-app-rewired": "^2.2.1",
"react-extras": "^3.0.0",
"react-ga": "^3.3.0",
"react-hot-loader": "^4.13.0",
"reactotron-apisauce": "^3.0.0",
"reactotron-react-js": "^3.3.2",
"reactotron-redux": "^3.1.1",
"reactotron-redux-saga": "^4.2.2",
"resolve-url-loader": "^3.1.2",
"sonarqube-scanner": "^2.8.0",
"styled-components": "^5.3.5"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"jest": {
"moduleDirectories": [
"node_modules",
"src"
],
"moduleNameMapper": {
"#components/(.*)": "<rootDir>/./src/components/$1",
"#util/(.*)": "<rootDir>/./src/util/$1",
"#hooks/(.*)": "<rootDir>/./src/hooks/$1",
"#constants/(.*)": "<rootDir>/./src/constants/$1",
"#containers/(.*)": "<rootDir>/./src/containers/$1",
"#routes/(.*)": "<rootDir>/./src/routes/$1",
"#appRedux/(.*)": "<rootDir>/./src/appRedux/$1"
}
}
}
I did the same update on my Dockerfile and It was solved!
I put all my variables on ENV, and instead of use RUN I used CMD to build my app.
FROM node:16.15.0
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . /usr/src/app
RUN npm install
RUN npm i serve -g
EXPOSE 80
ENV NODE_ENV=production REACT_APP_API_URL=https://url REACT_APP_AUDITORIA_API_URL=https://url GENERATE_SOURCEMAP=false DISABLE_ESLINT_PLUGIN=true
CMD ["npm", "run", "build"]
ENTRYPOINT ["sh","bootstrap.sh"]

No files matching the pattern were found: "'**/*.js'"

I downloaded expo project source code from github and tried to install node_module.
But I got following issue.
[error] No files matching the pattern were found: "'**/*.js'".
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.
My node version is 14.15.1
expo version: 4.0.8
react-native-cli: 2.0.1
and I will share my package.json file
{
"private": true,
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject",
"postinstall": "yarn prettier && yarn lint",
"prettier": "npx prettier --write '**/*.js'",
"lint": "eslint --ignore-path .gitignore --ignore-pattern \"!**/.*\" .",
"lint:fix": "eslint --ignore-path .gitignore --ignore-pattern \"!**/.*\" --fix ."
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.(js|jsx)": [
"yarn prettier",
"yarn lint:fix",
"git add"
]
},
"dependencies": {
"#babel/cli": "7.0.0",
"#babel/core": "^7.0.0",
"#babel/runtime": "7.0.0",
"#expo/vector-icons": "10.0.1",
"axios": "^0.18.0",
"babel-core": "^7.0.0-bridge.0",
"babel-plugin-inline-dotenv": "^1.2.2",
"concurrently": "^4.1.0",
"expo": "^37.0.0",
"expo-asset": "~6.0.0",
"expo-constants": "~6.0.0",
"expo-font": "~6.0.1",
"expo-google-app-auth": "^6.0.0",
"expo-image-picker": "~6.0.0",
"expo-location": "~6.0.0",
"expo-permissions": "~6.0.0",
"mobx": "^4.3.1",
"mobx-react": "^5.1.0",
"mobx-state-tree": "^3.7.0",
"moment": "^2.24.0",
"native-base": "^2.12.1",
"prop-types": "^15.6.2",
"react": "16.6.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",
"react-native-design-utility": "^0.0.30",
"react-native-gesture-handler": "~1.3.0",
"react-native-reanimated": "~1.1.0",
"react-native-tab-view": "^2.10.0",
"react-native-webview": "~5.12.0",
"react-navigation": "2.18.2",
"react-redux": "^6.0.1",
"redux": "^4.0.1",
"socket.io-client": "^2.2.0"
},
"devDependencies": {
"#babel/plugin-transform-runtime": "^7.4.0",
"babel-eslint": "^10.0.1",
"babel-plugin-transform-decorators-legacy": "^1.3.5",
"eslint": "^5.1.0",
"eslint-config-prettier": "^3.1.0",
"eslint-plugin-react": "^7.11.1",
"husky": "^1.1.2",
"lint-staged": "^7.3.0",
"schedule": "0.4.0"
}
}
How can I fix this issue?
I'm not sure it works. You can try to overwrite your prettier configuration like this
"prettier": "prettier --write \"src/**/*.{js,jsx,tsx,ts}\""
Previous solution really worked. Сan also is used without quotes:
"prettier": "prettier --write src/**/*.{js,jsx,tsx,ts}"

Resources