Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

N@8.0.1 while NPM upgrade (EBADPLATFORM) #704

Closed
colorstheforce opened this issue Dec 27, 2021 · 8 comments
Closed

N@8.0.1 while NPM upgrade (EBADPLATFORM) #704

colorstheforce opened this issue Dec 27, 2021 · 8 comments

Comments

@colorstheforce
Copy link

Problem

While Updating NPM thriws error
"npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for n@8.0.1: wanted {"os":"!win32"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS: !win32
npm ERR! notsup Valid Arch: undefined
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64"
Seems like its not defined in the code on your end, but i could be wrong, i do a heckin lot of dev on this workstation.

Short Version

Long Version

Configuration Details

$ n --version
?

$ command -v node
?

$ node -p process.platform
?
@shadowspawn
Copy link
Collaborator

shadowspawn commented Dec 27, 2021

Firstly, the error message. n is not supported on Windows. To get an early error the package.json includes:

  "os": ["!win32"],

This is what had triggered the error message you saw which comes from npm.

Now, why are you seeing it... Did you see the error message when running npm upgrade in a package directory? The package might have a dependency on n. You can check direct dependencies by looking in package.json, and can try npm ls n.

@shadowspawn shadowspawn changed the title N@8.0.1 while NPM upgrade N@8.0.1 while NPM upgrade (EBADPLATFORM) Dec 27, 2021
@colorstheforce
Copy link
Author

It's that the find of arch not being defined it's error is that it's undefined in the package, N, and that because my system has a defined arch, x64, it's throwing an error and claiming the ebadplatform. The release needs to specify it's accepting both x32, x64, and Undefined.

@shadowspawn
Copy link
Collaborator

I think the problem is the OS. From your report:

npm ERR! notsup Valid OS: !win32
npm ERR! notsup Actual OS: win32

What does this show for you?

node -p process.platform

@colorstheforce
Copy link
Author

Are you the creator or moderator or have any Business direct affiliation with the individual behind the last release of this package?
No, Your not.
Are you at least Knowledgeable about this packages system requirements?
No, You are not.
This specifies it is in fact compatable with my Operating System, The issue is that It's not defined as to what Validated Archs it supports throwing an error even though it is in fact compatable, it just need to specify that it accepts both x32 and x64 archs

@shadowspawn
Copy link
Collaborator

shadowspawn commented Dec 28, 2021

Wow, you are spectacularly wrong about some of that.

Are you the creator or moderator or have any Business direct affiliation with the individual behind the last release of this package?

Yes, I am the maintainer of this package. Yes, I am the individual behind the last release.

Are you at least Knowledgeable about this packages system requirements?

Yes, I am the current maintainer of this package. I respond to the reported issues. I make lots of the fixes and improvements myself.

Some of the past issues about Windows support, and the ugly error message: #254 #326 #358 #419 #435 #491 #626 #656

This specifies it is in fact compatable with my Operating System

And what is your operating system? What shell are you running your commands from?

There may be a problem with the package.json, but the current information you have supplied still leads me to believe you are running the commands from an unsupported context which identifies as win32. Please let me know any additional information to help me understand why this is not the best explanation.

The README says (as written by me):

n is supported on macOS, Linux, including with Windows Subsystem for Linux, and various other unix-like systems. It is written as a BASH script but does not require you to use BASH as your command shell.

n does not work in native shells on Microsoft Windows (like PowerShell), or Git for Windows BASH, or with the Cygwin DLL.

@colorstheforce
Copy link
Author

It's ok, I'm not sure what I'm doing anyhow. I was just installing dependencies on someone's template for something, I'm sorry to bother you. dimmsdale dimmadome dummy

@shadowspawn
Copy link
Collaborator

shadowspawn commented Dec 28, 2021

You may have missed the significance of the exclamation mark in "os":"!win32". This is saying the required operating system is anything except win32.

@aliasfoxkde
Copy link

aliasfoxkde commented Mar 24, 2023

I had this exact issue too but I think it was my mistake, possibly installed from the wrong directory, corrupted some module or whatnot. I determined my issue by looking at the npm log and reviewing some weird messages about directories missing things that shouldn't have been in the listed directories. Anyways, I removed "node_modules" in the root working directory, then ran:

npm uninstall npm -g

Browsed to "%userprofile%\AppData\Local" and removed:
npm-cache
node-gyp

And then re-installed/updated npm:
npm install npm -g
npm install -g npm@latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants