It creates the files, but after the npm start command this is the error message:
Failed to compile
./src/index.css (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-3-1!./node_modules/postcss-loader/src??postcss!./src/index.css)
Error: Package exports for '/media/parragi/Új kötet/Web development/react projects/react-playground/node_modules/autoprefixer/node_modules/kleur' do not define a valid './colors' target
The npm version is: 6.12.0
The create-react-app version is: 3.4.1
What should I do with it?
Related
I am unable to install #mui\material\generateUtilityClass library for my React application.
On running npm install #mui\material\generateUtilityClass, I am receiving the following error:
Could not install from "#mui\material\generateUtilityClass" as it does not contain a package.json file.
On running yarn add #mui\material\generateUtilityClass, receiving the following error:
An unexpected error occurred: "https://registry.yarnpkg.com/#mui%2fmaterial/generateUtilityClass: Request "https://registry.yarnpkg.com/#mui%2fmaterial/generateUtilityClass" returned a 405"
The following libraries need to be installed: #mui/lab and #mui/material
yarn add #mui/lab #mui/material
More: https://mui.com/material-ui/about-the-lab/
ERROR in ./src/components/Login.js 4:0-39
Module not found: Error: Cannot find file:
'styled-components.browser.esm.js' does not match the corresponding
name on disk:
'.\node_modules\styled-Components\dist\styled-components'.
This looks like an installation problem. Run/type in command line
npm install --save styled-components
and then restart your app, by running npm start
If you use yarn, replace npm with yarn.
Let us know if the issue resolves!
Failed to compile
./node_modules/jest-serializer/build/index.js
Module not found: Can't resolve 'v8' in 'C:\Users\Desktop\reactapp\react-project\node_modules\jest-serializer\build'
This error occurred during the build time and cannot be dismissed.
Try below steps :
1.Remove package-lock.json file.
2.Run npm install command.
3.Try to execute npm start again.
I am trying to run create-react-kotlin-app module using npm but it gives me this error:
Failed to compile
multi ./node_modules/react-dev-utils/webpackHotDevClient.js
./node_modules/react-scripts-kotlin/config/polyfills.js kotlinApp
Module not found: Syntax/Users/amin/package.json (directory
description file): SyntaxError: /Users/amin/package.json (directory
description file): SyntaxError: Unexpected end of JSON input
This error occurred during the build time and cannot be dismissed.
Although I have just followed these instructions:
npm install -g create-react-kotlin-app
create-react-kotlin-app my-app
cd my-app
npm start
Note: I could successfully run create-react-app module with no errors. My JDK is also 1.8.111 in case it matters. Does anyone know why do I get such an error and how to fix it?
Issue resolved after uninstalling Node from my MacBook and installing it again. follow these steps to uninstall Node completely: How to uninstall Node from MacOS
Then I installed Node again using brew install node (Don't forget brew update before that)
App was compiling last night when running npm start. This morning it's throwing this error:
Failed to Compile
./src/components/HamButton/styles.scss (./node_modules/css-loader??ref--6-oneOf-5-1!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/lib/loader.js??ref--6-oneOf-5-3!./src/components/HamButton/styles.scss)
To import Sass files, you first need to install node-sass.
Run `npm install node-sass` or `yarn add node-sass` inside your workspace.
Running npm install node-sass didn't fix it.
If I comment out all scss imports, app will compile however styles are not applied.
What's causing this and how can I fix it?
Thanks
Node v10.15.3
npm v6.4.1
Apparently my npm install was corrupt so followed these steps: On npm install: Unhandled rejection Error: EACCES: permission denied
Then installed node-sass and it worked.