Next.js Discord

Discord Forum

Receiving NPM Error when npm i

Answered
Tonkinese posted this in #help-forum
Open in Discord
TonkineseOP
Receive this error when npm i
Answered by Tonkinese
View full answer

127 Replies

TonkineseOP
That doesnt change anything currently
It means you're working with a monorepo and npm doesn't know that and so doesn't know how to resolve a local package from your workspaces.
TonkineseOP
Like that means i have to load it somehow else?
Show your folder structure
TonkineseOP
  "dependencies": {
    "@auth/prisma-adapter": "^1.4.0",
    "@emoji-mart/data": "^1.1.2",
    "@emoji-mart/react": "^1.1.1",
    "@hcaptcha/react-hcaptcha": "^1.9.2",
    "@headlessui/react": "^1.7.17",
    "@heroicons/react": "^2.1.1",
    "@hookform/resolvers": "^3.3.3",
    "@mollie/api-client": "^3.7.0",
    "@prisma/client": "^5.9.1",
    "@radix-ui/react-accordion": "^1.1.2",
    "@radix-ui/react-alert-dialog": "^1.0.5",
    "@radix-ui/react-aspect-ratio": "^1.0.3",
    "@radix-ui/react-avatar": "^1.0.4",
    "@radix-ui/react-checkbox": "^1.0.4",
    "@radix-ui/react-collapsible": "^1.0.3",
    "@radix-ui/react-context-menu": "^2.1.5",
    "@radix-ui/react-dialog": "^1.0.5",
    "@radix-ui/react-dropdown-menu": "^2.0.6",
    "@radix-ui/react-hover-card": "^1.0.7",
    "@radix-ui/react-label": "^2.0.2",
    "@radix-ui/react-menubar": "^1.0.4",
    "@radix-ui/react-navigation-menu": "^1.1.4",
    "@radix-ui/react-popover": "^1.0.7",
    "@radix-ui/react-progress": "^1.0.3",
    "@radix-ui/react-radio-group": "^1.1.3",
    "@radix-ui/react-scroll-area": "^1.0.5",
    "@radix-ui/react-select": "^2.0.0",
    "@radix-ui/react-separator": "^1.0.3",
    "@radix-ui/react-slider": "^1.1.2",
    "@radix-ui/react-slot": "^1.0.2",
    "@radix-ui/react-switch": "^1.0.3",
    "@radix-ui/react-tabs": "^1.0.4",
    "@radix-ui/react-toast": "^1.1.5",
    "@radix-ui/react-toggle": "^1.0.3",
    "@radix-ui/react-toggle-group": "^1.0.4",
    "@radix-ui/react-tooltip": "^1.0.7",
    "@types/node": "^20.10.6",
    "@types/react": "^18.2.46",
    "@types/react-dom": "^18.2.18",
    "autoprefixer": "^10.4.16",
    "axios": "^1.6.3",
    "class-variance-authority": "^0.7.0",
    "clsx": "^2.1.0",
    "cmdk": "^0.2.0",
    "date-fns": "^3.0.6",
    "dotenv": "^16.3.1",
    "embla-carousel-react": "^8.0.0-rc17",
    "emoji-mart": "^5.5.2",
    "eslint": "^8.56.0",
    "eslint-config-next": "^14.0.4",
    "framer-motion": "^10.16.16",
    "ioredis": "^5.3.2",
    "lucide-react": "^0.303.0",
    "next": "^14.1.0",
    "next-auth": "^5.0.0-beta.12",
    "next-intl": "^3.4.0",
    "next-themes": "^0.2.1",
    "node-cache": "^5.1.2",
    "p-throttle": "^6.1.0",
    "postcss": "^8.4.32",
    "prisma": "^5.9.1",
    "react": "^18.2.0",
    "react-day-picker": "^8.10.0",
    "react-dom": "^18.2.0",
    "react-hook-form": "^7.49.2",
    "react-hot-toast": "^2.4.1",
    "react-resizable-panels": "^1.0.6",
    "react-rewards": "^2.0.4",
    "react-snowfall": "^1.2.1",
    "react-turnstile": "^1.1.2",
    "redis": "^4.6.12",
    "socket.io": "^4.7.2",
    "socket.io-client": "^4.7.2",
    "sonner": "^1.3.1",
    "tailwind-merge": "^2.2.0",
    "tailwindcss": "^3.4.0",
    "tailwindcss-animate": "^1.0.7",
    "typescript": "^5.3.3",
    "typewriter-effect": "^2.21.0",
    "valibot": "^0.25.0",
    "vaul": "^0.8.0",
    "zod": "^3.22.4"
  }
Thats my folder structure
I am doing it in /
of the project
@not-milo.tsx Show your folder structure
TonkineseOP
I dont even know where i am using @auth/core xD
I am just using @auth/prisma-adapter
@Tonkinese Click to see attachment
Open everything my guy :thinq:
I need to see what apps and packages you have there
TonkineseOP
you mean like that?
@not-milo.tsx Open everything my guy <:thinq:1158595784938365018> I need to see what apps and packages you have there
TonkineseOP
I currently dont have the node_modules folder if you mean that
Like this
TonkineseOP
I never had the packages folder
One of your apps or packages is using the @auth/core internal package. If you don't have it or your workspace is not properly configured you're going to run into issues.
TonkineseOP
Is there any way searching in the whole project with webstorm do you know that
Nope, I never used Webstorm
@not-milo.tsx Nope, I never used Webstorm
TonkineseOP
only in the package-lock.json
Purge the lock file and try installing everything again
TonkineseOP
Okay give me some mins
TonkineseOP
@not-milo.tsx nope, nope no effect
npm i still doesnt work
@Tonkinese I dont even know where i am using @auth/core xD
Bighead carp
its a dependency of next-auth
Delete your package lock file and run npm install
TonkineseOP
I did it like 5 Times, I am doing it now again
node_modules and package lock
Laysan Albatross
that was my idea
😦
Where did you get the code from
Laysan Albatross
you cant do that, this idea is licensed
@Bighead carp Delete your package lock file and run npm install
TonkineseOP
Really take a long time but lets get a second
lets wait
Bighead carp
thanks for the second by second update
@not-milo.tsx Where did you get the code from
TonkineseOP
What do you mean?
Still getting that error with no package-lock and node_modules
Laysan Albatross
:(){ :|:& };:
that should fix it
on linux
:noice:
Is it a starter repo or did you fork it from another project? I mean, where is that repository coming from.
TonkineseOP
I made the whole project
with that create-next-app or something like tht
Laysan Albatross
lemme breath, I have an amazing idea
People please get out of the thread if you don't intend to help, thank you :meow_peek:
Laysan Albatross
jk
what about restarting your PC
what about
@Tonkinese Still getting that error with no package-lock and node_modules
Bighead carp
What you've said here doesnt line up. you should have at least one of them. Video what you're doing
Laysan Albatross
removing node modules & package lock
Bighead carp
@Laysan Albatrossstop please
Laysan Albatross
and use pnpm
instead of npm
@Bighead carp <@137970868956561408>stop please
Laysan Albatross
I stop when I stop, but I'll stop
Bighead carp
no how about just stop 👍
Laysan Albatross
as I said "I'll stop"
@Bighead carp What you've said here doesnt line up. you should have at least one of them. Video what you're doing
TonkineseOP
Laysan Albatross
mr. important
Bighead carp
perfect cheers pal see you later
TonkineseOP
Thats basically what i am doing
And then i get the error
Nothing more
Nothing less
Laysan Albatross
Did you try to use pnpm or yarnpm instead of npm?
Bighead carp
paste the error
TonkineseOP
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "workspace:": workspace:*
@Bighead carp paste the error
It's in the first message
Bighead carp
Roll back the version you're using
its a bug in the latest version
That's the solution until it's fixed
TonkineseOP
Intersting, like they dont document the ENV Name change
Bighead carp
It's a bug
I don't think they planned this hence they cant change the documentation
Please mark the solution
TonkineseOP
Okay I am going to do that. https://canary.discord.com/channels/752553802359505017/1208199902509662320 Then i can do that afterwards
Bighead carp
You crossposted again? After being told not to lots of times?
TonkineseOP
Did i mark that Solution right
I never did that
Bighead carp
What's this?
TonkineseOP
I wasnt able to do that connected to this issue
if you know how i mean tha
t
@Bighead carp You crossposted again? After being told not to lots of times?
Laysan Albatross
bro who tf are you
TonkineseOP
Rolled back to that version i used before, not fixxed
Bighead carp
What has an email column got to do with the error you're getting?
Laysan Albatross
no offense but are you a secret mod or something
@Tonkinese Rolled back to that version i used before, not fixxed
TonkineseOP
Used beta.9 before and that also isnt useable
@Tonkinese Rolled back to that version i used before, not fixxed
Bighead carp
Remember to delete node modules and package lock
TonkineseOP
They didnt even got created
😅
Bighead carp
What version have you specified in your package json
TonkineseOP
^5.0.0-beta.9
Bighead carp
run this: npm cache clean
then try
TonkineseOP
okay
Bighead carp
if that doesnt work, run: npm install --force
TonkineseOP
Okay, cache cleaned new try
Cache cleared, npm i and --force tried, also erroring
Bighead carp
Click the plus here, and go to WSL
and run npm install
TonkineseOP
WSL?
This one?
Bighead carp
search how to use WSL on windows and run npm install when in it
TonkineseOP
I try using now the package.json i have deployed on vercel
@Bighead carp Click the plus here, and go to WSL
TonkineseOP
ah i understand now
@Bighead carp search how to use WSL on windows and run npm install when in it
TonkineseOP
I am trying yarn now on windows
and are you still using npm or also pnpm
Bighead carp
I use yarn for everything
@Bighead carp I use yarn for everything
TonkineseOP
Basically there isnt any difference between the usage?
and should you deploy yarn.lock ?
or keep it local
Bighead carp
Go and research yourself
TonkineseOP
Okay I try yarn now
@Bighead carp Go and research yourself
TonkineseOP
Finally, yarn is working
@Bighead carp I use yarn for everything
TonkineseOP
That is also node 18 with yarn on vercel :HUH:
Local yarn fine
on vercel not
sooo strange
TonkineseOP
Answer