Skip to content

Change NVM_NODEJS_ORG_MIRROR to NODEJS_ORG_MIRROR to solve npm install error #942

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

Closed
superclarkk opened this issue May 25, 2016 · 13 comments

Comments

@superclarkk
Copy link

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
@bnoordhuis
Copy link
Member

What exactly are you reporting? Does something not work?

@superclarkk
Copy link
Author

npm reports that NVM_NODEJS_ORG_MIRROR is deprecated. Occurrences of this variable need to be changed to NODEJS_ORG_MIRROR

@bnoordhuis
Copy link
Member

You've got it the wrong way around, it's node-gyp that prints the warning. You have NVM_NODEJS_ORG_MIRROR set in your environment and that will stop working in the next major release.

Closing, not a bug.

@superclarkk
Copy link
Author

superclarkk commented May 25, 2016

I see - thanks for the clarification. I don't use node-gyp directly, but node-gyp rebuild is run automatically when node.bcrypt.js is installed, which is when this warning is generated.

It transpires that nvm sets the NVM_NODEJS_ORG_MIRROR variable in the latest version of nvm.sh and, indeed, NODEJS_ORG_MIRROR is not set.

So, it seems like bcrypt isn't going to install correctly when NVM_NODEJS_ORG_MIRROR is removed, and end-users will have to explicitly configure NODEJS_ORG_MIRROR. It seems like a potentially unnecessary configuration step for a lot of people.

If this is the case, is there anything that can be done to make it easier for those people? Do you think 'nvm' should set up the new variable in its script, or is there something bcrypt can do?

@bnoordhuis
Copy link
Member

Do you think 'nvm' should set up the new variable in its script

It should, and - in newer releases - it will. We discussed it with the maintainer of nvm before putting in that change.

@superclarkk
Copy link
Author

OK, that's good to hear. nvm doesn't set up the variable yet, but hopefully it will come shortly.
Thanks for explaining all this.

@YesThatAllen
Copy link

I'm still seeing this under node 7.2.1. Which configuration files are likely to be out of date on my setup?

@lfreneda
Copy link

lfreneda commented Jan 8, 2017

same here @w@

@YesThatAllen
Copy link

In my case, I solved this when reverting to 6.9.1 LTS. I haven't tried upgrading to v7 again.

@mceachen
Copy link

mceachen commented Mar 15, 2017

If you don't need to override the mirror, you can add this to your ~/.bash_profile or ~/.bashrc after you source nvm.sh to remove the warning:

unset NVM_NODEJS_ORG_MIRROR NVM_IOJS_ORG_MIRROR

I just opened nvm-sh/nvm#1429 to fix this in nvm proper.

@ljharb
Copy link
Member

ljharb commented Mar 15, 2017

@bnoordhuis I think you may have misunderstood #787 (comment) - nvm is not planning on adding support for $NODEJS_ORG_MIRROR any time soon (although I don't object to doing so in the future; it's just not worth the extra complexity at this time).

@hervenivon
Copy link

hervenivon commented Aug 29, 2017

Upgrading to the last NVM version solved the issue for me. 0.33.2

@AmarishRai
Copy link

AmarishRai commented Mar 12, 2019

Hi Geeks,
I am facing the below error, could you please advice how can I fix it.

[root@INCARNUS_SERVER nodejs-nan]# node-gyp build
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory /root/nodejs-nan/build' CXX(target) Release/obj.target/mimscds/mimscds.o cc1plus: error: unrecognized command line option "-std=gnu++1y" make: *** [Release/obj.target/mimscds/mimscds.o] Error 1 make: Leaving directory /root/nodejs-nan/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/root/n/lib/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 2.6.32-642.13.1.el6.x86_64
gyp ERR! command "/root/n/bin/node" "/root/n/bin/node-gyp" "build"
gyp ERR! cwd /root/nodejs-nan
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

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

8 participants