Failed to run nextjs project - reactjs

error - ./node_modules/next/dist/client/dev/amp-dev.js
Module not found: Can't resolve 'C:\Users\User\Desktop\React Projektiudemy\app\next demo\first-next\node_modules\next\dist\compiled\regenerator-runtime\runtime.js' in 'C:\Users\User\Desktop\React Projekti\udemy\app\next demo\first-next\node_modules\next\dist\client\dev'
This is the error I get and i tried the answers on the stack. I tried babel downgrade and it didn't work. Can someone help me?
Thanks.

I found solution to this problem. The answer is to remove "ud" from the file path. I made new folder and installed next js. The code shows no error.
I did this for anyone that has similar problem.

Related

Module not found: Error: Package path ./compat is not exported from package

I'm working on my project and all of a sudden, I got the following message from the compiler and don't know how to solve the problem:
ERROR in ./src/frontend/service/AuthService.ts 8:0-39
Module not found: Error: Package path ./compat is not exported from package /Users/chuben/Desktop/Coding_Projects/ecommerce-react-node/final.frontend.project/node_modules/firebase (see exports field in /Users/chuben/Desktop/Coding_Projects/ecommerce-react-node/final.frontend.project/node_modules/firebase/package.json)
ERROR in ./src/frontend/ui/page/RegisterPage/index.tsx 14:0-39
Module not found: Error: Package path ./compat is not exported from package /Users/chuben/Desktop/Coding_Projects/ecommerce-react-node/final.frontend.project/node_modules/firebase (see exports field in /Users/chuben/Desktop/Coding_Projects/ecommerce-react-node/final.frontend.project/node_modules/firebase/package.json)
I don't understand what the problem is and how should I export the path correctly? I will really appreciate anyone who can help solve this problem. Thanks in advance!
Hopefully, I don't have to do everything from scratch by starting a new project.
I found the issue there. I shouldn't set the following in my React page, or else the system will try to search the module for the variable or sth.
const [firebaseUid,setFirebaseUid]=useState<String|undefined>(undefined);

is there any way to resolve this animated error

Hi when I try start the project on simulator I get this error and I don't know how to solve it. I have been searching and cloud not find it who had some problem. it gives me this error ''export * as default from './Animated';'' the error
anyone knows how to fix it?
use #babel/plugin-proposal-export-namespace-from plugin

Next.js: ./node_modules/next/dist/client/dev/amp-dev.js

I have a very serious issue right now trying to use Next js. No matter what version I use, any time I try to run the npm run dev, I get the following error:
error - ./node_modules/next/dist/client/dev/amp-dev.js
Module not found: Can't resolve 'C:\Usersudbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\compiled\regenerator-runtime\runtime.js' in 'C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\node_modules\next\dist\client\dev'
error - Error: Cannot find module 'C:\Users\udbasili\Documents\Programming\Acumen Developers\myportfolio\.next\fallback-build-manifest.json'Require stack:
This is literally right after running the create next app command, so I don't install any additional package. One thing realized though is that this error doesn't occur when I use the public folder on my window PC but when I use the user folder called udbasili I get the above error. I have been using next.js for a long time and this is the first I am seeing this error
I had the same issue
the problem was that my project files was in a folder beginning with "ud". My folder name was "udemy".
Renaming that folder or moving the project outside that folder solved the issue
If you compare the paths, there is a missing '\' :
C:\Users**\\**udbasili\Documents\Programming\Acumen Developers\...
C:\Usersudbasili\Documents\Programming\Acumen Developers\...
A quick solution that I gave to this issue was to create the project on a different path. For example:
C:\dev\myportfolio
Please head over to https://nextjs.org/docs/messages/swc-disabled
By disabling swc in next.config.js it will resolve your issue.
You can disable swc by adding:
experimental: {
forceSwcTransforms: true,
}
It's possible your autoimport included '/dist/client/dev' in the 'next/amp' path.
Does it work if you import { useAmp } from 'next/amp'?

use of old package GenABEL

I would like to use the package GenABEL which is no longer available but archived.
I tried to install it
path<- "http://cran.r-project.org/src/contrib/Archive/GenABEL.data/GenABEL.data_1.0.0.tar.gz"
install.packages(path, repos=NULL, type="source")
Despite the successful installation, I get the error message "rntransform" not found.
Can someone help me?
I found the rntransform option really useful but cannot get it to work any longer.
Thank you!
Leonie
The link you posted is for downloading datasets used in GenABEL. Do you still have the same issue after downloading the GenABEL package (https://cran.r-project.org/src/contrib/Archive/GenABEL/)?

Can't resolve 'Math/Long'./node_modules/bytebuffer/ByteBuffer.js Module not found: Can't resolve 'Math/Long'

Hey all I'm trying to access the MTA's api in react using import GtfsRealtimeBindings from 'mta-gtfs-realtime-bindings'
yet i just keep getting this same error Can't resolve 'Math/Long'./node_modules/bytebuffer/ByteBuffer.js Module not found: Can't resolve 'Math/Long'
The more i read about it , seems like I might have an issue with webpack? I'm curious if anyone has ran into a similar issue before hand. Any help would be greatly appreciated. Thank you
I had the same exact problem.
The way I "fix" this is go to ./node_modules/bytebuffer/ByteBuffer.js and change "Math/Long" to "long" under the AMD loading all the way in the button of the file.
Do the same if you have another similar problem where it can't find ByteBuffer in ProtoBuf.js-- change "ByteBuffer" to "bytebuffer".
This is not a permanent fix, as it will reset itself when npm update/install is executed.

Resources