I am working on a react app and when I try to start my project with npm start on the terminal I get this error message on the Browser
And this on the terminal
Failed to compile.
./src/App.tsx
Module not found: Can't resolve '#apollo/client' in 'C:\Users\user\index-ui\src'
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys'
And the app.tsx is here
And the package.json file is on this pastebin link
App.tsx
You're trying to import the newer #apollo/client in App.tsx but installed the old "apollo-client": "^2.6.10". You need to remove apollo-client and add #apollo/client.
https://www.apollographql.com/docs/react/migrating/apollo-client-3-migration/
Related
I'm new with Redux and while I was trying to replicate my lecture which happened this morning I have the following error message. I don't know what I've missed, I have installed react-redux and redux with yarn for both.
Module not found: Error: Can't resolve './redux/store' in '/Users/antoine/Documents/Web Projects/Integrify.io/ISA6/7. Redux/redux-practice/src'
ERROR in ./src/index.js 10:0-34
Module not found: Error: Can't resolve './redux/store' in '/Users/antoine/Documents/Web Projects/Integrify.io/ISA6/7. Redux/redux-practice/src'
webpack compiled with 1 error
I have installed react-redux and redux with yarn for both.
Edit:
Here is a screenshot from my browser's console:
Uncaught Error: Cannot find module './redux/store'
Edit: I have found the answer to my question, I have not installed TypeScript properly at the beginning of my setup with
yarn create react-app . --template typescript
I am having trouble with the heroicons module.
I have installed npm i #heroicons/react#2.0.10 and now it somehow is having trouble with the import.
I get the following error message: Compiled with problems:X
ERROR in ./src/components/header/Header.js 8:0-122
Module not found: Error: Can't resolve '#heroicons/react/20/outline' in '/Users/michaelbecker/Desktop/Project/projectarbeit_schleif/client/src/components/header'
I am receiving an error when i try to deploy using vercel, i created the app with vite
this is what i get:
vite v3.0.2 building for production...
transforming...
✓ 42 modules transformed.
[vite]: Rollup failed to resolve import "swiper/react" from "src/components/Slider.jsx".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
error during build:
Error: [vite]: Rollup failed to resolve import "swiper/react" from "src/components/Slider.jsx".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
at onRollupWarning (file:///vercel/path0/node_modules/vite/dist/node/chunks/dep-1513d487.js:43558:19)
at onwarn (file:///vercel/path0/node_modules/vite/dist/node/chunks/dep-1513d487.js:43349:13)
at Object.onwarn (file:///vercel/path0/node_modules/rollup/dist/es/shared/rollup.js:23177:13)
at ModuleLoader.handleResolveId (file:///vercel/path0/node_modules/rollup/dist/es/shared/rollup.js:22334:26)
at file:///vercel/path0/node_modules/rollup/dist/es/shared/rollup.js:22295:26
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Error: Command "npm run build" exited with 1```
Any suggestion on how to solve it?
I am trying to update my react library from 16 to 17 for Material UI v5 migration, but was unable to update one of the dependencies.
When I try to update materialui-daterange-picker with a forked repo, I get a module not found error.
Command used
npm install 'https://gitpkg.now.sh/jungsoft/materialui-daterange-picker/package?master'
Error
> react-scripts build
Creating an optimized production build...
Failed to compile.
Module not found: Error: Can't resolve 'materialui-daterange-picker'...
In my package.json, I have the following line
{
"materialui-daterange-picker": "https://gitpkg.now.sh/jungsoft/materialui-daterange-picker/package?master"
}
Code
import { DateRangePicker } from 'materialui-daterange-picker'
Hello everyone i am trying to use this npm package i found in my gatsby js project https://www.npmjs.com/package/boxrec-client.
I have tried to import the library in my index.js file but seem to be getting this weird FS module error that cant be found. I have already added the package to yarn. below is my code
my imports look like this
import React from "react"
import { Link } from "gatsby"
import Layout from "../components/layout"
import Image from "../components/image"
import SEO from "../components/seo"
import boxrecClient from '../../node_modules/boxrec-client';
i am currently getting this error in my console and blank page in my localhost window.
ℹ 「wdm」: Compiling...
ERROR Failed to compile with 1 errors 7:18:28 PM
⠀
This dependency was not found:
⠀
* fs in ./node_modules/request/lib/har.js
⠀
To install it, you can run: npm install --save fs
✖ 「wdm」:
ERROR in ./node_modules/request/lib/har.js
Module not found: Error: Can't resolve 'fs' in '/Users/kevinlopez/Desktop/sample-site/node_modules/request/lib'
# ./node_modules/request/lib/har.js 3:9-22
# ./node_modules/request/request.js
# ./node_modules/request/index.js
# ./node_modules/boxrec-client/index.js
# ./src/pages/index.js
# ./.cache/sync-requires.js
# ./.cache/app.js
# multi ./node_modules/event-source-polyfill/src/eventsource.js (webpack)-hot-middleware/client.js?path=/__webpack_hmr&reload=true&overlay=false ./.cache/app
ℹ 「wdm」: Failed to compile.
i have also tried to install this fs package but the error consists would someone be able to guide me in the right direction ? Thanks
A BoxRec client which fetches data from the BoxRec boxing website via web scraping in Node.js. Fetches return promise objects which will resolve with the fetched data if successful.
'fs' is a backend Nodejs library (file-system), you cannot use that in the browser.