How to fix "SyntaxError: invalid syntax" for npm-update? - npm-update

I'm currently having issues with some of my modules being outdated/missing for my Discord.js bot, so I want to use npm-update to fix my outdated/missing packages. When I go to use the command; I get a syntax error in the PowerShell window.
I've already tried updating npm and reinstalling it, no difference was made. Same error.
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\zombi\AppData\Local\Programs\Python\Python37-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:276:12)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at maybeClose (internal/child_process.js:915:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\zombi\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\zombi\Documents\code projects\Discord Bots\Duck Bot\node_modules\integer
gyp ERR! node -v v8.14.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN discord.js#11.4.2 requires a peer of bufferutil#^3.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.4.2 requires a peer of erlpack#discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.4.2 requires a peer of node-opus#^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.4.2 requires a peer of sodium#^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.4.2 requires a peer of libsodium-wrappers#^0.7.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.4.2 requires a peer of uws#^9.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js-commando#0.10.0 requires a peer of sqlite#^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN enmap#4.3.3 requires a peer of better-sqlite-pool#^0.1.2 but none is installed. You must install peer dependencies yourself.
npm WARN duck_bot#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! integer#1.0.5 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the integer#1.0.5 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\zombi\AppData\Roaming\npm-cache\_logs\2019-05-26T13_12_30_616Z-debug.log
I expect npm to update all the packages/reinstall missing modules that the bot relies on, but I only get an error.

Related

Getting a error when installing TRUFFLE on windows

I have tried installing truffle on windows powershell with Execution Policy set to "ByPass".
And installing a older version but noting has worked any help is appreciated.
I have node v16.13.0. And have not had any problems before with installing packages.
As well I have the latest version of Virtual studio code.
npm ERR! code 1
npm ERR! path C:\Users\boxin\AppData\Roaming\npm\node_modules\truffle\node_modules\ganache\node_modules\secp256k1
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.2.0
npm ERR! gyp info using node#16.13.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.0 found at "C:\Users\boxin\AppData\Local\Programs\Python\Python310\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:404:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! gyp ERR! System Windows_NT 10.0.22000
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\boxin\AppData\Roaming\npm\node_modules\truffle\node_modules\ganache\node_modules\secp256k1
npm ERR! gyp ERR! node -v v16.13.0
npm ERR! gyp ERR! node-gyp -v v8.2.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
Hello did u try npm install --g --production windows-build-tools
Similar problem -> node-gyp configure got "gyp ERR! find VS"
Lot of ppl had similiar issue and this command helped
If nothing will help i can recommend u https://remix.ethereum.org/ its online IDE that simulate everything. (I have good experience with it on Ether and solidity)
I fix the problem by uninstalling node.js and reinstall in it. And when i installed node, I checked the box that shows up that installs extra build tools.

Error While Trying To Install Ganache CLI

Im getting these errors when trying to install ganache globally on my windows 10, please help
C:\Program Files\nodejs\node_modules\ganache\node_modules\leveldown
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#16.14.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.6 found at "C:\Users\lenovo\AppData\Local\Programs\Python\Python39\python.exe"
npm ERR! gyp ERR! UNCAUGHT EXCEPTION
npm ERR! gyp ERR! stack Error: Cannot find module 'psl'
npm ERR! gyp ERR! stack Require stack:
npm ERR! gyp ERR! stack - C:\Users\lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\request\node_modules\tough-cookie\lib\pubsuffix-psl.js
npm ERR! gyp ERR! stack - C:\Users\lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\request\node_modules\tough-cookie\lib\cookie.js
npm ERR! gyp ERR! stack - C:\Users\lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\request\lib\cookies.js
npm ERR! gyp ERR! stack - C:\Users\lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\request\index.js
npm ERR! gyp ERR! stack - C:\Users\lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\install.js
npm ERR! gyp ERR! stack - C:\Users\lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\node-gyp.js
npm ERR! gyp ERR! stack - C:\Users\lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js
npm ERR! gyp ERR! stack at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
npm ERR! gyp ERR! stack at Function.Module._load (node:internal/modules/cjs/loader:778:27)
npm ERR! gyp ERR! stack at Module.require (node:internal/modules/cjs/loader:1005:19)
npm ERR! gyp ERR! stack at require (node:internal/modules/cjs/helpers:102:18)
npm ERR! gyp ERR! stack at Object.<anonymous> (C:\Users\lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\request\node_modules\tough-cookie\lib\pubsuffix-psl.js:32:11)
npm ERR! gyp ERR! stack at Module._compile (node:internal/modules/cjs/loader:1103:14)
npm ERR! gyp ERR! stack at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
npm ERR! gyp ERR! stack at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR! gyp ERR! stack at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR! gyp ERR! stack at Module.require (node:internal/modules/cjs/loader:1005:19)
npm ERR! gyp ERR! System Windows_NT 10.0.18363
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\lenovo\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Program Files\nodejs\node_modules\ganache\node_modules\leveldown
npm ERR! gyp ERR! node -v v16.14.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! Node-gyp failed to build your package.
npm ERR! gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lenovo\AppData\Local\npm-cache\_logs\2022-03-10T10_32_11_739Z-debug.log
Try creating a virtualenv then install ganache cli, the errors seems to be with npm not recognizing ganache to link with the python on your system.
mkdir (project_name)
change into dir
run python3 -m venv <name-of-env>
then, reinstall ganache cli.

CentOS 7 Cannot Find Module 'parse-server'

I've been trying these days to run a local parse server in VirtualBox (with CentOS 7, red-had_x64) with the parse-server-example repository. The problem is that this error appears always when I do sudo npm start.
> parse-server-example#1.4.0 start /root/Documentos/github/parse-server-example
> node index.js
module.js:478
throw err;
^
Error: Cannot find module 'parse-server'
at Function.Module._resolveFilename (module.js:476:15)
at Function.Module._load (module.js:424:25)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/root/Documentos/github/parse-server-example/index.js:5:44)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
npm ERR! Linux 3.10.0-1160.36.2.el7.x86_64
npm ERR! argv "/usr/bin/node" "/bin/npm" "start"
npm ERR! node v6.17.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! parse-server-example#1.4.0 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the parse-server-example#1.4.0 start script 'node index.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the parse-server-example package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs parse-server-example
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls parse-server-example
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /root/Documentos/github/parse-server-example/npm-debug.log
I also have been reading about this, and try the sudo npm install parse-server and also npm install parse-server and both of them give me this:
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated apollo-tracing#0.15.0: The `apollo-tracing` package is no longer part of Apollo Server 3. See https://www.apollographql.com/docs/apollo-server/migration/#tracing for details
npm WARN deprecated apollo-cache-control#0.14.0: The functionality provided by the `apollo-cache-control` package is built in to `apollo-server-core` starting with Apollo Server 3. See https://www.apollographql.com/docs/apollo-server/migration/#cachecontrol for details.
npm WARN deprecated graphql-extensions#0.15.0: The `graphql-extensions` API has been removed from Apollo Server 3. Use the plugin API instead: https://www.apollographql.com/docs/apollo-server/integrations/plugins/
npm WARN deprecated uuid#3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request#2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated #parse/simple-mailgun-adapter#1.1.0: Package no longer supported. Use at your own risk. Find a list of supported e-mail adapters at https://github.com/parse-community/parse-server#email-verification-and-password-reset
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated axios#0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated lsof#0.1.0: No longer maintained
npm WARN deprecated mkdirp#0.5.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated babel-eslint#10.1.0: babel-eslint is now #babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated graphql-tools#4.0.8: This package has been deprecated and now it only exports makeExecutableSchema.\nAnd it will no longer receive updates.\nWe recommend you to migrate to scoped packages such as #graphql-tools/schema, #graphql-tools/utils and etc.\nCheck out https://www.graphql-tools.com to learn what package you should use instead
npm notice
npm notice New minor version of npm available! 7.20.3 -> 7.21.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.21.0
npm notice Run npm install -g npm#7.21.0 to update!
npm notice
npm ERR! code 1
npm ERR! path /root/Documentos/github/parse-server-example/node_modules/kerberos
npm ERR! command failed
npm ERR! command sh -c prebuild-install || node-gyp rebuild
npm ERR! make: se ingresa al directorio `/root/Documentos/github/parse-server-example/node_modules/kerberos/build'
npm ERR! CXX(target) Release/obj.target/kerberos/src/kerberos.o
npm ERR! make: se sale del directorio `/root/Documentos/github/parse-server-example/node_modules/kerberos/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#16.7.0 | linux | x64
npm ERR! gyp info find Python using Python version 2.7.5 found at "/usr/bin/python"
npm ERR! gyp http GET https://nodejs.org/download/release/v16.7.0/node-v16.7.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.7.0/node-v16.7.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v16.7.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.7.0/SHASUMS256.txt
npm ERR! (node:3831) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/root/Documentos/github/parse-server-example/node_modules/kerberos/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/root/.cache/node-gyp/16.7.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/16.7.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/16.7.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/root/Documentos/github/parse-server-example/node_modules/kerberos',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! g++: error: unrecognized command line option ‘-std=gnu++14’
npm ERR! make: *** [Release/obj.target/kerberos/src/kerberos.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 3.10.0-1160.36.2.el7.x86_64
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /root/Documentos/github/parse-server-example/node_modules/kerberos
npm ERR! gyp ERR! node -v v16.7.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-08-24T00_20_33_671Z-debug.log
The versions of my node.js when I put node -v
v16.7.0
And my mongoDB version with mongo -version is:
MongoDB shell version v4.4.8
Build Info: {
"version": "4.4.8",
"gitVersion": "83b8bb8b6b325d8d8d3dfd2ad9f744bdad7d6ca0",
"openSSLVersion": "OpenSSL 1.0.1e-fips 11 Feb 2013",
"modules": [],
"allocator": "tcmalloc",
"environment": {
"distmod": "rhel70",
"distarch": "x86_64",
"target_arch": "x86_64"
}
}

Node.JS installing CLD

I'm trying to install the CLD package in my notebook, but keep receiving error in compilation.
Some basic info about my installation:
OS: Win 7 Professional (64bit)
Visual Studio: 2012
Command used: npm install cld --msvs_version=2012
Node.JS version: 5.4.0
Virtual Memory on C drive and E drive are both between 4GB to 8GB.
With reference to MSVS's support site on error C1060, I have tried option 2 and 3 but no luck. Would anyone be able advise on this error? Detailed log is as below.
E:\node_modules\nan\nan.h(70): fatal error C1060: compiler is out of heap space (..\src\cld.cc) [E:\node_modules\cld\build\cld.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd E:\node_modules\cld
gyp ERR! node -v v5.4.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN ENOENT ENOENT: no such file or directory, open 'E:\package.json'
npm WARN EPACKAGEJSON !invalid#1 No description
npm WARN EPACKAGEJSON !invalid#1 No repository field.
npm WARN EPACKAGEJSON !invalid#1 No README data
npm WARN EPACKAGEJSON !invalid#1 No license field.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "cld" "--msvs_version=2012"
npm ERR! node v5.4.0
npm ERR! npm v3.3.12
npm ERR! code ELIFECYCLE
npm ERR! cld#2.4.5 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cld#2.4.5 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the cld package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls cld
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! E:\npm-debug.log
try to install VS2013 Express Desktop version. Then re-install.
npm install cld --msvs_version=2013
reference: https://github.com/nodejs/node-gyp/blob/master/README.md#installation

changed default gcc version, now compiling problems

For an installation I had to change my default gcc compiler version. I had some compilation issues with the version I used so I downloaded several other versions via macports, and one of them worked for my installation finally.
I'm almost sure that the one I used before was gcc4.2, listed in my ports as: llvm-gcc42 .
In two other cases now I am facing compilation problems of c++ files. I'm not knowledgeable with c++, I'm using the compiler just for the compilation of some - mostly node.js - modules or now, a package for the atom editor.
Here is what I get, that leads me to the assumtion that something with the c++ compiler is not correct:
cc1plus: error: unrecognized command line option "-std=gnu++0x"
I could get rid of this in the first case by changing the default gcc version. But I cannot try several versions everytime.
So: Which is the gcc version I should use or is there anything else that could cause this? gcc5, the latest gives me the same..
In a specific case: Problem with installing termrk (module for the atom editor)
gcc --version
gcc (MacPorts gcc5 5.2.0_0) 5.2.0
[...]
There are two ways to install atom packages: Inside the editor with the gui and with the command line tool apm. Neither one works, but I get different error messages.
1. inside the gui:
> pty.js#0.2.13 install /private/var/folders/nl/2ppbw8fn0cjbw04pdqbxmqtr0000gn/T/apm-install-dir-115913-1105-1g6fykw/node_modules/Termrk/node_modules/pty.js
> node-gyp rebuild
CXX(target) Release/obj.target/pty/src/unix/pty.o
cc1plus: error: unrecognized command line option "-std=gnu++0x"
make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Darwin 12.6.0
gyp ERR! command "node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /private/var/folders/nl/2ppbw8fn0cjbw04pdqbxmqtr0000gn/T/apm-install-dir-115913-1105-1g6fykw/node_modules/Termrk/node_modules/pty.js
gyp ERR! node -v v0.10.40
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
npm ERR! Darwin 12.6.0
npm ERR! argv "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/Users/michael/.atom/.apm/.apmrc" "--userconfig" "/Users/michael/.atom/.apmrc" "install" "/private/var/folders/nl/2ppbw8fn0cjbw04pdqbxmqtr0000gn/T/d-115913-1105-1hg4ytj/package.tgz" "--target=0.30.7" "--arch=x64"
npm ERR! node v0.10.40
npm ERR! npm v2.13.3
npm ERR! code ELIFECYCLE
npm ERR! pty.js#0.2.13 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pty.js#0.2.13 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the pty.js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls pty.js
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /private/var/folders/nl/2ppbw8fn0cjbw04pdqbxmqtr0000gn/T/apm-install-dir-115913-1105-1g6fykw/npm-debug.log
1. In the terminal:
~ michael$ sudo apm install termrk
Installing termrk to /Users/michael/.atom/packages ✗
> pty.js#0.2.13 install /private/tmp/apm-install-dir-115913-1063-2zj63h/node_modules/Termrk/node_modules/pty.js
> node-gyp rebuild
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
node.js:844
var cwd = process.cwd();
^
Error: EACCES, permission denied
at Function.startup.resolveArgv0 (node.js:844:23)
at startup (node.js:58:13)
at node.js:935:3
npm ERR! Darwin 12.6.0
npm ERR! argv "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/Users/michael/.atom/.apm/.apmrc" "--userconfig" "/Users/michael/.atom/.apmrc" "install" "/private/tmp/d-115913-1063-1cgkfyq/package.tgz" "--target=0.30.7" "--arch=x64"
npm ERR! node v0.10.40
npm ERR! npm v2.13.3
npm ERR! code ELIFECYCLE
npm ERR! pty.js#0.2.13 install: `node-gyp rebuild`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the pty.js#0.2.13 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the pty.js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls pty.js
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /private/tmp/apm-install-dir-115913-1063-2zj63h/npm-debug.log
That is a valid option for GCC 5.2 so if it says it's unrecognized then it means you are not using GCC 5.2.
You're probably still compiling with the old GCC 4.2 version.