简体   繁体   English

TypeError [ERR_UNKNOWN_FILE_EXTENSION]:/node_modules/country-flag-icons/modules/countries.json 的未知文件扩展名“.json”

[英]TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".json" for /node_modules/country-flag-icons/modules/countries.json

i have been working on a project for the last couple of days.最近几天我一直在做一个项目。 it was working fine but from the previous days, it's showing me this JSON extension error.它工作正常,但从前几天开始,它向我显示了这个 JSON 扩展错误。 TO solve this issue I deleted the node_modules file, .next file, uninstalled the country-flag-icons from the dependency, and also deleted the yarn.lock file but still, this error is coming.为了解决这个问题,我删除了 node_modules 文件,.next 文件,从依赖项中卸载了 country-flag-icons,还删除了 yarn.lock 文件,但仍然会出现这个错误。 For a moment I thought that maybe I did something wrong in the code so, I reset the previous commits and tried to start but still, it is the same error.有那么一刻,我想也许我在代码中做错了什么,所以我重置了以前的提交并尝试开始,但仍然是同样的错误。

my dependencies are我的依赖是

 "dependencies": { "@babel/preset-react": "^7.16.7", "@date-io/date-fns": "1.3.13", "@emotion/cache": "^11.6.0", "@emotion/react": "^11.7.0", "@emotion/server": "^11.4.0", "@emotion/styled": "^11.6.0", "@fullcalendar/daygrid": "^5.10.1", "@fullcalendar/interaction": "^5.10.1", "@fullcalendar/list": "^5.10.1", "@fullcalendar/react": "^5.10.1", "@fullcalendar/timegrid": "^5.10.1", "@fullcalendar/timeline": "^5.10.1", "@iconify/react": "^3.1.0", "@material-ui/pickers": "^3.3.10", "@mui/icons-material": "^5.2.4", "@mui/lab": "^5.0.0-alpha.59", "@mui/material": "^5.2.2", "@nandorojo/swr-firestore": "^0.16.0", "@zeit/next-css": "^1.0.1", "@zeit/next-sass": "^1.0.1", "axios": "^0.24.0", "change-case": "^4.1.2", "country-flag-icons": "^1.5.2", "date-fns": "^2.27.0", "firebase": "^9.6.1", "formik": "^2.2.9", "framer-motion": "^4.1.17", "jwt-check-expiration": "^1.0.5", "material-ui-phone-number": "^3.0.0", "moment": "^2.29.1", "next": "^12.0.7", "next-transpile-modules": "^9.0.0", "node-sass": "^4.14.1", "notistack": "^2.0.3", "nprogress": "^0.2.0", "otp-input-react": "^0.2.4", "prevent-orientation": "^2.1.0", "prop-types": "^15.7.2", "react": "17.0.2", "react-countdown": "^2.3.2", "react-dom": "17.0.2", "react-drag-drop-files": "^2.2.2", "react-intersection-observer": "^8.32.5", "react-lazy-load-image-component": "^1.5.1", "react-number-format": "^4.9.1", "react-otp-input": "^2.4.0", "react-phone-input-mui": "^2.9.4", "react-phone-number-input": "^3.1.44", "react-quill": "^2.0.0-beta.4", "react-screen-orientation": "^0.0.4", "request-ip": "^2.1.3", "simplebar": "^5.3.6", "simplebar-react": "^2.3.6", "stylis": "^4.0.10", "stylis-plugin-rtl": "^2.1.1", "timezone-support": "^2.0.2", "typescript": "^4.4.4", "yup": "^0.32.11" },

my jscongif.json file is我的 jscongif.json 文件是

 { "compilerOptions": { "baseUrl": "." }, "include": [], "exclude": ["node_modules", "**/node_modules/*"] }

I'm truly stuck with this problem.我真的被这个问题困住了。 it would be great if you could solve this.如果你能解决这个问题那就太好了。 Thanks.谢谢。

I've accidentally stumbled upon this thread while googling for ERR_UNKNOWN_FILE_EXTENSION .在搜索ERR_UNKNOWN_FILE_EXTENSION时,我不小心偶然发现了这个线程。 And I also happen to be the maintainer of the country-flag-icons package.我也恰好是country-flag-icons包的维护者。 I've just published country-flag-icons@1.5.3 with a probable fix.我刚刚发布了country-flag-icons@1.5.3并进行了可能的修复。 You could try that one out.你可以试试那个。

暂无
暂无

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

相关问题 ts-node TypeError [ERR_UNKNOWN_FILE_EXTENSION]:未知文件扩展名“.ts” - ts-node TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" 收到错误 TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension "" for D:\Projects\matri-site\bin\www for Node Js v14 - Getting error TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension "" for D:\Projects\matri-site\bin\www for Node Js v14 SyntaxError:不能在没有模块的情况下使用导入语句,TypeError [ERR_UNKNOWN_FILE_EXTENSION]:Catch 22 - SyntaxError: Cannot use import statment without a module, TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Catch 22 为什么 jest 在尝试将 ts 文件用作自定义 testEnvironment 时会抛出 ERR_UNKNOWN_FILE_EXTENSION? - Why does jest throw an ERR_UNKNOWN_FILE_EXTENSION when trying to use a ts file as custom testEnvironment? 如何在json / javascript文件中列出node_modules文件夹? - How to list node_modules folders in a json/javascript file? 使用angular-cli.json将文件从node_modules移动到资产 - Move a file from node_modules to assets using angular-cli.json TSC 正在逆着 tsconfig.json 文件的方向编译 node_modules 和类型声明文件 - TSC is compiling node_modules and type declaration files against the direction of the tsconfig.json file 在Rails应用程序的node_modules中找不到.map扩展名 - Not found .map extension from node_modules in rails app 从node_modules中的依赖关系中复制文件 - Copy file from node_modules in a dependency 在node_modules中对文件的本地更改(角度2) - Local changes to file in node_modules (Angular 2)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM