Domanda

I am trying to connect Node.js with MariaDB. Its throwing error while installing the mariasql package using npm.

 npm install mariasql

Error

TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [C:\Users\xyz\Desktop\rtrt\am2\node_modules\mariasql\build\deps\libmariadbclient\zlib\zlib.vcxproj]

Note:

Windows 7

Node.js - 0.10.24

È stato utile?

Soluzione

You will need Visual C++ (not sure which version) to download and build this module. Infact, for most npm modules which aren't pure JS modules, it is recommended to use a linux machine for development and deployment, since most of those modules are written to be built on linux build tools, and work as expected in the linux environment.

Altri suggerimenti

This error occurs because CL.EXE cannot be found. CL is a Microsoft compiler/linker for C/C++. Based on the path you provided, MariaSQL is pointing to a vcxproj file for zlib. A vcxproj is a Visual Studio C/C++ project file, and zlib is a compression library. Based on the file paths, it looks like NPM is attempting to build zlib which seems unnecessary, but this problem occurs because you either do not have Visual Studio installed, the path is incorrect, or you don't need to build zlib. My suggestion would be to add the "--production" flag when calling NPM so that development-only dependencies are not installed. That will not work however since MariaSQL does not declare devDependencies. It appears that you need to install Visual Studio or configure your paths correctly.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top