React-App crashed due to node-sass error | TypeError: fs.existsSync is not a function
React-App crashed due to node-sass error | TypeError: fs.existsSync is not a function
过去几个月我一直在处理我的应用程序,它在安装 node-sass 时运行良好,直到我遇到以下错误今天 node-sass 模块本身。
我尝试通过将 node-sass 升级到 version-5 进行调试,安装了 sass-loader 试了所有方法至今无果。错误仍然存在。
我的Package.json文件:
{
"name": "giftshop2",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"firebase": "^7.23.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-router-dom": "^5.2.0",
"react-scripts": "^4.0.0",
"sass-loader": "^10.0.5"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
非常感谢任何帮助。
我刚刚发现问题不在node-sass,我不小心导入了render[=24] =] from node-sass 在我的一个组件中,这破坏了我的整个应用程序。当我评论它时,我的应用程序又开始工作了。 4 小时后我发现这是多么愚蠢的错误 :)
我的问题一直悬而未决,不会删除它,万一有人遇到同样的问题,这会很有帮助。
谢谢
过去几个月我一直在处理我的应用程序,它在安装 node-sass 时运行良好,直到我遇到以下错误今天 node-sass 模块本身。
我尝试通过将 node-sass 升级到 version-5 进行调试,安装了 sass-loader 试了所有方法至今无果。错误仍然存在。
我的Package.json文件:
{
"name": "giftshop2",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"firebase": "^7.23.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-router-dom": "^5.2.0",
"react-scripts": "^4.0.0",
"sass-loader": "^10.0.5"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
非常感谢任何帮助。
我刚刚发现问题不在node-sass,我不小心导入了render[=24] =] from node-sass 在我的一个组件中,这破坏了我的整个应用程序。当我评论它时,我的应用程序又开始工作了。 4 小时后我发现这是多么愚蠢的错误 :)
我的问题一直悬而未决,不会删除它,万一有人遇到同样的问题,这会很有帮助。
谢谢