Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    jlynde
    @jlynde
    I do NOT see the path entry you suggested should be there. And the Windows version is Windows 10 Enterprise 10.0.17134 Build 17134
    Corey Butler
    @coreybutler
    I suspect permissions issues. Are you seeing the prompt like the screenshot above?
    jlynde
    @jlynde
    Nope.
    Corey Butler
    @coreybutler
    C:\Users\cbutler>nvm install 10.16.3
    Downloading node.js version 10.16.3 (64-bit)...
    Complete
    Creating C:\Users\cbutler\AppData\Local\nvm\temp
    
    Downloading npm version 6.9.0... Complete
    Installing npm v6.9.0...
    
    Installation complete. If you want to use this version, type
    
    nvm use 10.16.3
    
    C:\Users\cbutler>nvm use 10.16.3
    Now using node v10.16.3 (64-bit)
    
    C:\Users\cbutler>npm -v
    6.9.0
    
    C:\Users\cbutler>nvm install 8.9.4
    Downloading node.js version 8.9.4 (64-bit)...
    Complete
    Creating C:\Users\cbutler\AppData\Local\nvm\temp
    
    Downloading npm version 5.6.0... Complete
    Installing npm v5.6.0...
    
    Installation complete. If you want to use this version, type
    
    nvm use 8.9.4
    
    C:\Users\cbutler>nvm use 8.9.4
    Now using node v8.9.4 (64-bit)
    
    C:\Users\cbutler>npm -v
    5.6.0
    I can't recreate (see ^^)
    Remember to run the shell as an administrator
    Windows requires elevated administrative privileges to create symlinks in protected directories (like C:\Program Files). Your original approach of installing in C:\nvm could work as well, but again, it depends on which permissions the user account has.
    jlynde
    @jlynde
    Are there any log files created that would show the permissions issue? I guess I will try one last time installing in C:\nvm...
    jlynde
    @jlynde
    Well, darn. That did not work, either. So unless there are some logs that would help I guess I have no other choice than to give up and just install and uninstall manually each time I need to make a switch. Bummer
    Corey Butler
    @coreybutler
    There might be logs in the event system viewer, but permission issues aren't typically logged. You could also add the npm path manually, but it would be very strange to have to do that.
    jlynde
    @jlynde
    OK. Well, thanks for trying anyway!
    Corey Butler
    @coreybutler
    Well that's super frustrating. I'm sorry, I really wish I knew what was going on. The only other thing I can think of is a proxy issue, perhaps npm didn't fully download.
    but given you're doing fresh installs, I doubt it would be an NVM4W proxy configuration... corporate firewall?
    jlynde
    @jlynde
    Agreed. I spent quite a bit of time on this today Googling before using this forum. I was REALLY hoping to get this to work. But it is very possible that it is something that my company has done "protect us". Unfortunately, I just can't really spend any more time on this right now. I will just need to do things the old fashioned way for now. Again, thanks for your help!
    Corey Butler
    @coreybutler
    Your welcome. If you do find the root of the issue, please log it on Github. This particular experience is, unfortunately, a common symptom with many potential root causes. The more edge cases I'm aware of, the better the experience can be.
    jlynde
    @jlynde
    Will do!
    NShulzhenko
    @NShulzhenko
    Hi, just entered to help @jlynde cause had same issue
    this one what helped me so problem that npm folder is not copied in node_modules of installed with nvm node verison
    So I had same can not find npm-cli.js error but fixed using the article from above
    If You can automate that process this will fix issue for win10 users
    Adam
    @Poltergeisen
    Hi, just tried changing my nvm root directory and now im getting exec: "C:\\Git\\nvm\\elevate.cmd": file does not exist:
    does anyone know how to fix this issue?
    Renato Silva
    @rmsilva1973
    image.png
    Hey @coreybutler has anyone reported problems installing the LTS version of node with nvm?
    Renato Silva
    @rmsilva1973
    Never mind...
    Miclarsen1
    @Miclarsen1

    Hey all - I am seeing the same problem, and the problem seem to be using "nvm" to install a new version. I tried this with several different versions, including the current release, but the result is always the same.

    The version is listed as installed, and "nvm use" with the new version just installed works fine. However something must be going wrong during the installation, because when I look in the newly created root folder for that version, the "node_modules" folder that should contain a "npm" folder is empty, which tells me that the installation is incomplete

    The only version that currently works is the first on I installed, but all version are consistently incorrectly installed. The version folder itself is created and I can use the version, but seeing as the folder is empty it makes perfect sense this error is thrown, since the npm-cli.js file is literally not there.

    So files are missing after install, but the reason why has so far eluded me.

    Best regards,

    Michael

    jayasingh1
    @jayasingh1
    Hello! Has anyone run into the following? NVM is installed, a version of Node is installed via NVM, but nvm use <installed_node_version> fails with: fork/exec C:\Users\jaya\AppData\Roaming\nvm\elevate.cmd: The parameter is incorrect.:
    Javier
    @javierpr71
    Hi
    I have installed nvm-wiundows on a Windows 10 with latest updates applied
    In an admin console I run this:

    PS C:\Users\MyUser> nvm install 12.18.2
    Downloading node.js version 12.18.2 (64-bit)...
    Complete
    Creating C:\Users\MyUser\AppData\Roaming\nvm\temp

    Downloading npm version 6.14.5... Complete
    Installing npm v6.14.5...

    Installation complete. If you want to use this version, type

    nvm use 12.18.2

    After run "nvm use 12.18.2" I have an error running npm
    Javier
    @javierpr71
    if I run "npm -v" I have the next error message:

    internal/modules/cjs/loader.js:969
    throw err;
    ^

    Error: Cannot find module 'C:\nodejs\node_modules\npm\bin\npm-cli.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
    at Function.Module._load (internal/modules/cjs/loader.js:842:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
    code: 'MODULE_NOT_FOUND',
    requireStack: []
    }
    internal/modules/cjs/loader.js:969
    throw err;
    ^

    Error: Cannot find module 'C:\nodejs\node_modules\npm\bin\npm-cli.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
    at Function.Module._load (internal/modules/cjs/loader.js:842:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
    code: 'MODULE_NOT_FOUND',
    requireStack: []
    }

    In %APPDATA%\nvm\v12.18.2\node_modules the folder is empty
    nvm hasn't installed any files here
    Any idea?
    I'm running vnm-windows in other machine and it works fine
    @coreybutler Can you help me?
    Thank you
    Corey Butler
    @coreybutler

    @Poltergeisen - this usually happens when a prior version of Node existed before NVM4W was installed. It can also happen if NVM4W can't move the installations to the new directory.
    @rmsilva1973 That looks like an error message from an older version of NVM4W.
    @Miclarsen1 If you had Node installed prior to NVM4W, npm can get confused about where it is being copied to.
    @jayasingh1, @javierpr71 Same thing, pre-existing versions of Node often cause this.

    If Node exists before NVM4W is installed, the system PATH often still points to old versions of Node. npm uses these same paths.

    Juan Lopez
    @somedumbfox

    So, i'm running into a pretty well know problem. In which the fixes are not working for me. It's the one where nvm throws the error: The system cannot find the path specified.

    Originally this error was thrown when there were spaces in the path for both the NVM_HOME and NVM_SYSLINK paths. However, both paths are configured to be simple folders in the root of my E: drive. (E:\nvm, E:\nodejs). So that shouldn't be causing the issue.

    I did install the shadow patch recommended on the wiki to see if that would fix my issue. But to no avail.

    This issue seemed to surface when I upgraded my windows machine to version 1809. I don't know if that correlates. But it seems worth mentioning.

    I've been manually changing versions since (my computer was upgraded in May), but I'm now working on multiple projects that's kinda making it impractical to do. Anything I can do to help troubleshoot this further? I'd really like to get it working.

    Corey Butler
    @coreybutler
    @somedumbfox - is the E drive a physical hard drive? Which terminal are you running it in? When in doubt, always try running in the basic command shell as an admin. Don't run it in the Linux subsystem, cmder, or anything else (during troubleshooting)
    Juan Lopez
    @somedumbfox
    @coreybutler Yes, the E: drive is a physical hard drive. I am using Windows Command Prompt or Powershell as Administrator when I run into the error.
    I have tried using default settings with the Shadow patch release. I've also configured it to be a root folder on my C: drive to see if I get different results. But I still encounter the error.
    Also worth noting is NVM is (sometimes) changing the shortcut path on for nodejs. But occasionally the shortcut is deleted entirely and not replaced.
    Juan Lopez
    @somedumbfox
    If the shortcut is successfully changed, NPM can be called but it throws a "'Node' is not a recognized internal or external" error. So It's kinda like a partial config makes it through.
    Corey Butler
    @coreybutler
    @somedumbfox it does seem like something isn't getting configured correctly. NVM does change the location of the symlink. Do you have anything else in your PATH that could be pointing to a different version of Node, either an old install or even a different version manager?
    Juan Lopez
    @somedumbfox
    I've looked in my environment variables. I don't see anything out of the ordinary or pointing to old references of node. NVM is the only version manager I used so far. I'm not aware of any others compatible with windows.
    Annotation 2020-07-28 132253.png