Code Monkey home page Code Monkey logo

Comments (12)

vkbansal avatar vkbansal commented on May 22, 2024 1

It's not just coffeelint. Even npm install -g npm and npm install -g less produces similar errors.

from nvm-windows.

coreybutler avatar coreybutler commented on May 22, 2024

I was unable to recreate this... I was able to install successfully, reinstall successfully, and remove successfully (using npm v1.4.28). I'd suggest trying npm uninstall -g coffeelint first.

The coffee module and associated packages are fairly notorious for not following standards and being a little glitchy, especially with backwards compatibility. So, it could just be this module.

from nvm-windows.

coreybutler avatar coreybutler commented on May 22, 2024

I can't recreate any of these errors... which version of node and npm are you running this against?

from nvm-windows.

vkbansal avatar vkbansal commented on May 22, 2024

capture

As you can see, I'm using node v0.10.33 and npm v2.1.10

from nvm-windows.

coreybutler avatar coreybutler commented on May 22, 2024

Sorry - should have caught that in the debug. I hate to ask a stupid question, but are you running the command prompt as an admin?

The issue is pretty clear "Refusing to delete"... there are a finite number of reasons why a file cannot be deleted. Either the permissions aren't acceptable, or perhaps the file is in use. There is also the possibility this is an issue with npm. Keep in mind the version of npm that ships with 0.10.33 is 1.4.28. The 2.x.x branch isn't shipping with a stable version of node... yet.

At this point, I think it's unlikely this is an NVM issue.

from nvm-windows.

vkbansal avatar vkbansal commented on May 22, 2024

Yep tried it even with an elevated command prompt. Still same error.

Refusing to delete: C:\Program Files\nodejs\lessc.cmd not in C:\Program Files\nodejs
File exists: C:\Program Files\nodejs\lessc.cmd
Move it away, and try again.

According to the message, also tried after removing less.cmd. Still getting same error.

Everything will run fine if I do nvm uninstall 0.10.33, nvm install 0.10.33, npm install -g less

Can you make sense of lines 77-80 in the log?

from nvm-windows.

coreybutler avatar coreybutler commented on May 22, 2024

If an uninstall/reinstall worked, then I'm confident this is an npm issue. By reinstalling, npm was reset to the default version (1.4.8).

Lines 77-78 are part of npm's process for finding the node_modules directory. I'm not sure about line 79, but line 80 is looking for the .cmd file in the node root when I believe it's supposed to be in the npm root.

from nvm-windows.

vkbansal avatar vkbansal commented on May 22, 2024

can this be related to #26 ?

from nvm-windows.

coreybutler avatar coreybutler commented on May 22, 2024

It's highly unlikely. npm is installed uniquely for each version of node. At one point in our dialog, you mentioned running an npm update npm or npm install -g npm, which would change the version of npm for node 0.10.33.

If you had reinstalled node and still experienced the same issues, then I'd be more suspicious of NVM, but I'm pretty certain the issue is related to npm. In fact, I'm confident enough in this that I'm going to close this issue (of course, I can reopen if necessary).

If you want to experiment, you could try a fresh install of node 0.10.33, then install your modules. This should work without a hitch and be a baseline for the test. Then uninstall those modules (or reinstall node 0.10.33). Then update npm via npm update npm or npm install -g npm and try to install the modules again. I suspect they'll fail, which would indicate an issue with npm. If that is the case, I'd file a bug with npm.

from nvm-windows.

vkbansal avatar vkbansal commented on May 22, 2024

Just wanted to share this link. May be you could add this to readme:
https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows

from nvm-windows.

Splaktar avatar Splaktar commented on May 22, 2024

It looks like the previous link has been moved. I think that https://npm.community/t/installing-upgrading-npm/251/2 is the new location.

from nvm-windows.

Splaktar avatar Splaktar commented on May 22, 2024

I checked the Common Issues Wiki but didn't see this issue covered there. I get a failure with both npm i -g npm and npm update -g npm.

I read through this issue but I don't see a resolution. The suggestion in the link I posted above is to use https://github.com/felixrieseberg/npm-windows-upgrade#upgrade-npm-on-windows, but that doesn't seem like a good solution to me. It would require installing that NPM package globally in every NPM version that I install, plus it requires a number of extra steps and permissions.

from nvm-windows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.