I am facing an issue while trying to run a legacy create-react-app that utilizes Sass. Initially, when I ran npm start, I encountered the error 'Cannot find module sass', which resembled the message found in this stack overflow post. To resolve this, I attempted removing node modules, installing npm react-scripts, and then running npm install again. However, now when I execute the command 'npm start', I am presented with the following error:
ERROR in ./src/App.scss (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[7].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[7].use[2]!./node_modules/resolve-url-loader/index.js??ruleSet[1].rules[1].oneOf[7].use[3]!./node_modules/react-scripts/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[7].use[4]!./src/App.scss)
Module build failed (from ./node_modules/react-scripts/node_modules/sass-loader/dist/cjs.js):
SassError: Top-level selectors may not contain the parent selector "&".
╷
10 │ &::-webkit-input-placeholder {
│ ^
╵
src\scss\_mixins.scss 10:2 placeholder-color()
src\scss\basic\_typography.scss 59:1 @import
src\scss\_style.scss 7:9 @import
src\App.scss 1:9 root stylesheet
Furthermore, here is the snippet from my package.json file:
{
"name": "tf-react",
"version": "4.6.0",
"license": "MIT",
// Dependencies listed...
}