简体   繁体   English

未找到与该模式匹配的文件:“'**/*.js'”

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

I downloaded expo project source code from github and tried to install node_module.我从 github 下载了 expo 项目源代码并尝试安装 node_module。 But I got following issue.但是我遇到了以下问题。

[error] No files matching the pattern were found: "'**/*.js'". [错误] 未找到与该模式匹配的文件:“'**/*.js'”。 error Command failed with exit code 2. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.错误命令失败,退出代码为 2。 info 访问https://yarnpkg.com/en/docs/cli/run以获取有关此命令的文档。 error Command failed with exit code 2. error 命令失败,退出代码为 2。

My node version is 14.15.1 expo version: 4.0.8 react-native-cli: 2.0.1我的节点版本是 14.15.1 expo 版本:4.0.8 react-native-cli: 2.0.1

and I will share my package.json file我将分享我的 package.json 文件

{

    "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 is really work.以前的解决方案确实有效。 Сan also be used without quotes: Сan 也可以不带引号使用:

"prettier": "prettier --write src/**/*.{js,jsx,tsx,ts}"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 找不到与“xxx.js”匹配的文件中的错误 - ERROR in No files matching 'xxx.js' were found 错误:找不到与模式“'./src/views/{tokens,atoms,molecules,organisms}/**/*.scss'”匹配的文件 - Error: No files matching the pattern "'./src/views/{tokens,atoms,molecules,organisms}/**/*.scss'" were found “没有找到与模式“src”匹配的文件。” 使用“npx eslint src”或“npx eslint src/”时 - "No files matching the pattern "src" were found." when using "npx eslint src" or "npx eslint src/" 没有找到匹配的文件...。 (ReactJS) - No matching files ... were found. (ReactJS) 来自2个不同数据源的JS模式匹配 - JS Pattern matching from 2 different sources of data JS:通过找到的单词缩短搜索结果 - JS: shorten search results by the words, which were found 未找到具有提供的路径的文件:build. 不会上传任何工件。 - Github 将 React 应用程序部署到 Firebase 的操作 - No files were found with the provided path: build. No artifacts will be uploaded. - Github Action for deploying React App to Firebase Typeorm + Firebase 功能:部署后“No connection options were found in any orm configuration files” - Typeorm + Firebase functions: “No connection options were found in any orm configuration files” after deployed 404 未找到 static 文件 React JS | NGINX - 404 Not Found static files React JS | NGINX 在 JavaScript 中可视化模式匹配 - Visualising pattern matching in JavaScript
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM