How do i fix npm build error in windows 10? - javascript

I tried everything but not able to install even a single npm module.
How should I fix this?
Microsoft Windows [Version 10.0.17134.590]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\Dell\Desktop\npmtestfolder>npm install bootstrap
ed25519#0.0.4 install C:\Users\Dell\node_modules\ed25519
node-gyp rebuild
C:\Users\Dell\node_modules\ed25519>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Users\Dell\node_modules\ed25519\build\ed25519.vcxproj(20,3): error MSB4019: The imported project "C:\Microsoft.Cpp.D
efault.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on
disk.
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` 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: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 Windows_NT 10.0.17134
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 C:\Users\Dell\node_modules\ed25519
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\Dell\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Dell\package.json'
npm WARN bootstrap#4.3.1 requires a peer of jquery#1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap#4.3.1 requires a peer of popper.js#^1.14.7 but none is installed. You must install peer dependencies yourself.
npm WARN Dell No description
npm WARN Dell No repository field.
npm WARN Dell No README data
npm WARN Dell No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ed25519#0.0.4 (node_modules\ed25519):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ed25519#0.0.4 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ bootstrap#4.3.1
updated 1 package and audited 5449 packages in 13.153s
found 0 vulnerabilities

There are many reasons for your above mentioned error. Like your system don't get the proper path to buildsystem.
Your project's name also matters.
Your CMD's rights matters too like [Run as an Administrator].
Have you initialised your project with npm init? There is also written that package.json is not found. You are installing npm library on your windows root User's directory(here Dell is yours). Don't do that.
Make a separate directory and cd your dir by CMD with Administrator. Initialise your directory with npm init. Then try to install your respective libraries with (i.e npm i bootstrap).
This may help you. And if not, this are the best practices. You should follow, when you working on Node.

Related

Error when upgrading electron-wix-msi from 2.2.0 to 3.0.0

I am creating MSI installer for my electron application and I want to add a desktop shortcut icon on the time of installing the application. earlier I was using electron-wix-msi#2.2.0 which does not provide the feature. the desktop shortcut icon feature is added in version 3.0.0. I am getting an error when upgrading electron-wix-msi from version 2.2.0 to 3.0.0
npm install electron-wix-msi#3.0.0
> exe-icon-extractor#1.0.8 install F:\002_Installer_Upgrade\node_modules\exe-icon-extractor
> node-gyp rebuild
F:\002_Installer_Upgrade\node_modules\exe-icon-extractor>if not defined npm_config_node_gyp (node "C:\Users\xxxxxxxx\AppData\Roaming\nvm\v10.16.3\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\xxxxxxxxx\AppData\Roaming\nvm\v10.16.3\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
module.cc
win_delay_load_hook.cc
..\src\module.cc(275): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc [F:\002_Installer_Upgrade\node_modules\exe-icon-extractor\build\module.vcxproj]
..\src\module.cc(330): warning C4101: 'status' : unreferenced local variable [F:\002_Installer_Upgrade\node_modules\exe-icon-extractor\build\module.vcxproj]
LINK : fatal error LNK1117: syntax error in option 'LTCG:INCREMENTAL' [F:\002_Installer_Upgrade\node_modules\exe-icon-extractor\build\module.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\xxxxxxxxx\AppData\Roaming\nvm\v10.16.3\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\xxxxxxxxx\\AppData\\Roaming\\nvm\\v10.16.3\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd F:\002_Installer_Upgrade\node_modules\exe-icon-extractor
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN saveError ENOENT: no such file or directory, open 'F:\002_Installer_Upgrade\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'F:\002_Installer_Upgrade\package.json'
npm WARN 002_Installer_Upgrade No description
npm WARN 002_Installer_Upgrade No repository field.
npm WARN 002_Installer_Upgrade No README data
npm WARN 002_Installer_Upgrade No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: exe-icon-extractor#1.0.8 (node_modules\exe-icon-extractor):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: exe-icon-extractor#1.0.8 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ electron-wix-msi#3.0.0
updated 1 package and audited 77 packages in 18.198s
found 4 low severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
I am using node-gyp#3.8.0. is it the issue with node-gyp?

Error installing webdriverIO using "npm install wdio"

I'm seeing this error after i run the following commands:
npm install webdriverio
npm install mocha
npm install selenium-standalone
.\node_modules.bin\selenium-standalone install
error seen after running this:
npm install wdio
any advise on how to fix this guys, it is greatly appreciated.. thanks
D:\MyTest02>npm install wdio
npm WARN deprecated webdriverio#4.14.4: outdated version, please use #next
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
> fibers#4.0.2 install D:\MyTest02\node_modules\fibers
> node build.js || nodejs build.js
D:\MyTest02\node_modules\fibers>if not defined npm_config_node_gyp (node "C:\Users\seanr\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --release ) else (node "C:\Users\seanr\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild --release )
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if the py launcher can be used to find Python 2
gyp ERR! find Python - "py.exe" is not in PATH or produced an error
gyp ERR! find Python checking if Python is C:\Python27\python.exe
gyp ERR! find Python - "C:\Python27\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Python37\python.exe
gyp ERR! find Python - "C:\Python37\python.exe" could not be run
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
gyp ERR! find Python (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python npm config set python "C:\Path\To\python.exe"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack at PythonFinder.fail (C:\Users\seanr\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47)
gyp ERR! stack at PythonFinder.runChecks (C:\Users\seanr\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\seanr\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16)
gyp ERR! stack at PythonFinder.execFileCallback (C:\Users\seanr\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16)
gyp ERR! stack at exithandler (child_process.js:283:5)
gyp ERR! stack at ChildProcess.errorhandler (child_process.js:295:5)
gyp ERR! stack at emitOne (events.js:116:13)
gyp ERR! stack at ChildProcess.emit (events.js:211:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:196:12)
gyp ERR! stack at onErrorNT (internal/child_process.js:362:16)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\seanr\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--release"
gyp ERR! cwd D:\MyTest02\node_modules\fibers
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++ build-essential`
RHEL users please run: `yum install gcc-c++` and `yum groupinstall 'Development Tools'`
Alpine users please run: `sudo apk add python make g++`
'nodejs' is not recognized as an internal or external command,
operable program or batch file.
npm WARN notsup Unsupported engine for wdio#4.0.0: wanted: {"node":">=10.0.0"} (current: {"node":"8.12.0","npm":"6.14.2"})
npm WARN notsup Not compatible with your version of node/npm: wdio#4.0.0
npm WARN notsup Unsupported engine for fibers#4.0.2: wanted: {"node":">=10.0.0"} (current: {"node":"8.12.0","npm":"6.14.2"})
npm WARN notsup Not compatible with your version of node/npm: fibers#4.0.2
npm WARN enoent ENOENT: no such file or directory, open 'D:\MyTest02\package.json'
npm WARN MyTest02 No description
npm WARN MyTest02 No repository field.
npm WARN MyTest02 No README data
npm WARN MyTest02 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fibers#4.0.2 install: `node build.js || nodejs build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fibers#4.0.2 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\seanr\AppData\Roaming\npm-cache\_logs\2020-03-04T13_56_34_890Z-debug.log
any advise on this is greatly appreciated
This is something related to the latest version of NodeJS which is explained here. I would advise you below two options to get rid of this. Choose the best that suits you.
Please setup python in your machine
Downgrade your Nodejs to version 10.X and try it. I am using 10.18.0 and it works perfectly fine. You can download it from here.
Cheers!

Unforseen errors when running sudo npm install -g #vue/cli

I've tried every solution on the web, besides he dangerous silver bullet chown -R solution to get vue.js up and running via the cli.
Supposedly, I don't have permission to manipulate the npm folder, but again I'm not too sure anymore.
In Terminal, I'm getting the error below. I've google searched the errors one by one, tried out some potential solutions but nothing worked.
What can I do to fix this?
node-pre-gyp WARN Pre-built binaries not installable for fsevents#1.2.4 and node#11.3.0 (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/jamf/bin/lib/node_modules/#vue/cli/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64'
gyp ERR! clean error
gyp ERR! stack Error: EACCES: permission denied, rmdir 'build'
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/jamf/bin/jamf/node" "/usr/local/jamf/bin/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "clean"
gyp ERR! cwd /usr/local/jamf/bin/lib/node_modules/#vue/cli/node_modules/fsevents
gyp ERR! node -v v11.3.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/jamf/bin/jamf/node /usr/local/jamf/bin/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js clean' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/jamf/bin/lib/node_modules/#vue/cli/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:978:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/jamf/bin/jamf/node" "/usr/local/jamf/bin/lib/node_modules/#vue/cli/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/jamf/bin/lib/node_modules/#vue/cli/node_modules/fsevents
node-pre-gyp ERR! node -v v11.3.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/jamf/bin/jamf/node /usr/local/jamf/bin/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js clean' (1)
npm WARN #apollographql/apollo-upload-server#5.0.3 requires a peer of graphql#^0.13.1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules/#vue/cli/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ #vue/cli#3.2.1
You can use the chown -R option. Because the folders it's trying to access were made by another proces, your user account is not the owner, and thus can't make changes there. When you use chown -R you just change the ownership of the folder to your user, not dangerous. I had to do it a couple of times for npm on my new laptop.
the command you would want to use is:
sudo chown <username> -R ./*
In folder: /usr/local/jamf/bin/lib i think, if that doesn't work, try going up one folder and use the same command there.
sudo npm install -g #vue/cli --unsafe-perm
See this vue-cli issue on GitHub

Why isn't anything installing on Node.js?

Today I decided to try out creating a discord bot in Node.js. When I went to install it, I started getting errors. I started to search the internet to find the solution, when I found out nothing was installing. For example,
C:\Users\aidan\Documents\discord bot>npm install --global --production windows-build-tools
npm WARN engine windows-build-tools#1.2.1: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine request#2.81.0: wanted: {"node":">= 4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine har-validator#4.2.1: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine har-schema#1.0.5: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
\
windows-build-tools#1.2.1 postinstall C:\Users\aidan\AppData\Roaming\npm\node_modules\windows-build-tools
node ./lib/index.js
Downloading BuildTools_Full.exe
[> ] 0.0% (0 B/s)
Downloading python-2.7.11.msi
[> ] 0.0% (0 B/s)
Downloaded python-2.7.11.msi. Saved to C:\Users\aidan\.windows-build-tools\python-2.7.11.msi.
Starting installation...
Launched installers, now waiting for them to finish.
This will likely take some time - please be patient!
Waiting for installers... -C:\Users\aidan\AppData\Roaming\npm\node_modules\windows-build-tools\lib\install\tailer.js:92
if (data.includes('Variable: IsInstalled = 1') || data.includes('Variabl
^
TypeError: undefined is not a function
at Tailer.handleData (C:\Users\aidan\AppData\Roaming\npm\node_modules\windows-build-tools\lib\install\tailer.js:92:16)
at null.<anonymous> (C:\Users\aidan\AppData\Roaming\npm\node_modules\windows-build-tools\lib\install\tailer.js:72:16)
at wrapper [as _onTimeout] (timers.js:265:14)
at Timer.listOnTimeout (timers.js:110:15)
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--global" "--production" "windows-build-tools"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! code ELIFECYCL
npm ERR! windows-build-tools#1.2.1 postinstall: `node ./lib/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the windows-build-tools#1.2.1 postinstall script 'node ./lib/index.js'.
npm ERR! This is most likely a problem with the windows-build-tools package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./lib/index.js
npm ERR! You can get their info via:
npm ERR! npm owner ls windows-build-tools
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\aidan\Documents\discord bot\npm-debug.log
C:\Users\aidan\Documents\discord bot>
was what I got when I attempted to install build tools. I'm using Windows 10 Creators Update on a 64 bit machine.
Oh, yeah, and when I tried to install discord.js:
C:\Users\aidan\Documents\discord bot>npm install discord.js
npm WARN engine discord.js#11.1.0: wanted: {"node":">=6.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN peerDependencies The peer dependency bufferutil#^3.0.0 included from discord.js will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency erlpack#hammerandchisel/erlpack included from discord.js will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency node-opus#^0.2.5 included from discord.js will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency opusscript#^0.0.3 included from discord.js will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency sodium#^2.0.1 included from discord.js will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency libsodium-wrappers#^0.5.1 included from discord.js will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency uws#^0.14.1 included from discord.js will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN engine uws#0.14.5: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
|
> bufferutil#3.0.0 install C:\Users\aidan\Documents\discord bot\node_modules\bufferutil
> prebuild-install || node-gyp rebuild
prebuild-install info begin Prebuild-install version 2.1.2
prebuild-install info looking for local prebuild # prebuilds\bufferutil-v3.0.0-node-v14-win32-ia32.tar.gz
prebuild-install WARN install EPERM, access 'C:\Users\aidan\AppData\Roaming\npm-cache'
C:\Users\aidan\Documents\discord bot\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (rebuild)
Traceback (most recent call last):
File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 18, in <module>
sys.exit(gyp.script_main())
File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 534, in script_main
return main(sys.argv[1:])
File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 527, in main
return gyp_main(args)
File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 503, in gyp_main
options.circular_check)
File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 98, in Load
generator.CalculateVariables(default_variables, params)
File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1867, in CalculateVariables
generator_flags.get('msvs_version', 'auto'))
File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 402, in SelectVisualStudioVersion
versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
KeyError: '2015'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:343:16)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\aidan\Documents\discord bot\node_modules\bufferutil
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
> uws#0.14.5 install C:\Users\aidan\Documents\discord bot\node_modules\uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0
Thanks for your help!
-Aidan
I do not use Windows but found this blog from Treehouse.
http://blog.teamtreehouse.com/install-node-js-npm-windows
*Make sure you install node 1st, npm 2nd, and then any packages you want

Installing Mojito in windows

I want to install Mojito in Windows. I have MinGW and nodejs in Windows. But I am not able to install Mojito using npm install -g mojito. It gives the following error on installing in windows
npm WARN package.json connect#1.8.2 No README.md file found!
npm WARN engine connect#1.8.2: wanted: {"node":">= 0.4.1 < 0.7.0"} (current: {"node":"0.8.3","npm":"1.1.43"})
npm WARN engine express#2.5.2: wanted: {"node":">= 0.4.1 < 0.7.0"} (current: {"node":"0.8.3","npm":"1.1.43"})
npm ERR! error rolling back errno: 53,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your operating system or architecture: yui3#0.7.12
npm ERR! notsup Valid OS: darwin,linux
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: ia32
npm ERR! System Windows_NT 6.1.7601
npm ERR! code EBADPLATFORM
npm ERR! stack Error: Unsupported
npm ERR! stack at checkPlatform (c:\Program Files (x86)\nodejs\node_modules\npm\lib\install.js:747:14)
npm ERR! stack at Array.1 (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\slide\lib\bind-actor.js:15:8)
npm ERR! stack at LOOP (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:15:14)
npm ERR! stack at c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:18:7
npm ERR! stack at checkEngine (c:\Program Files (x86)\nodejs\node_modules\npm\lib\install.js:726:10)
npm ERR! stack at Array.0 (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\slide\lib\bind-actor.js:15:8)
npm ERR! stack at LOOP (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:15:14)
npm ERR! stack at chain (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:20:5)
npm ERR! stack at installOne_ (c:\Program Files (x86)\nodejs\node_modules\npm\lib\install.js:692:3)
npm ERR! stack at installOne (c:\Program Files (x86)\nodejs\node_modules\npm\lib\install.js:615:3)
npm http GET https://registry.npmjs.org/mkdirp/0.0.7
In Yahoo Developer Website it is mentioned clearly that Unix-based system is a Prerequisites, but is it possible to install it on windows by using cygwin or mingw.
It's an open issue, sorry about that.
Add yourself to https://github.com/yahoo/mojito/issues/264 to keep track of our progress.

Categories

Resources