Installation issues on Windows 7 Home 64
Hi,
I'm trying to install node-mapserv on a Windows 7 Home 64 machine. I have MapServer 6.2 source files with lib_dir and include dir set to npm config. I had to install Python 2.7 and node-gyp from GitHub source. So far, I was able to fix the errors/warnings I had, but now I've got this one I'm unable to find a solution for:
"ValueError: No escaped character while trying to load binding.gyp"
I couldn't find the binding.gyp file. Does anyone know more about this issue ?
Thanks,
Alexandre
Here's the full error outputed:
C:\Path\To\node>npm install mapserv
npm http GET https://registry.npmjs.org/mapserv
npm http 304 https://registry.npmjs.org/mapserv
> [email protected] install C:\Path\To\node\node_modules\mapserv
> node-gyp rebuild
C:\Path\To\node\node_modules\mapserv>node "C:\Path\To\node\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Traceback (most recent call last):
File "C:\Path\To\node\node_modules\npm\node_modules\node-gyp\gyp\gyp", line 18, in <module>
sys.exit(gyp.main(sys.argv[1:]))
File "C:\Path\To\node\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 523, in main
return gyp_main(args)
File "C:\Path\To\node\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 499, in gyp_main
options.circular_check)
File "C:\Path\To\node\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 129, in Load
params['parallel'])
File "C:\Path\To\node\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 2556, in Load
variables, includes, depth, check, True)
File "C:\Path\To\node\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 391, in LoadTargetBuildFile
build_file_data, PHASE_EARLY, variables, build_file_path)
File "C:\Path\To\node\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 1220, in ProcessVariablesAndConditionsInDict
build_file)
File "C:\Path\To\node\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 1235, in ProcessVariablesAndConditionsInList
ProcessVariablesAndConditionsInDict(item, phase, variables, build_file)
File "C:\Path\To\node\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 1220, in ProcessVariablesAndConditionsInDict
build_file)
File "C:\Path\To\node\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 1239, in ProcessVariablesAndConditionsInList
expanded = ExpandVariables(item, phase, variables, build_file)
File "C:\Path\To\node\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 938, in ExpandVariables
output = shlex.split(str(replacement))
File "C:\python27\lib\shlex.py", line 279, in split
return list(lex)
File "C:\python27\lib\shlex.py", line 269, in next
token = self.get_token()
File "C:\python27\lib\shlex.py", line 96, in get_token
raw = self.read_token()
File "C:\python27\lib\shlex.py", line 191, in read_token
raise ValueError, "No escaped character"
ValueError: No escaped character while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Path\To\node\node_modules\npm\node_modules\node-gyp\lib\configure.js:416:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Path\\To\\node\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Path\To\node\node_modules\mapserv
gyp ERR! node -v v0.8.22
gyp ERR! node-gyp -v v0.8.5
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the mapserv 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 mapserv
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Path\\To\\node\\\\node.exe" "C:\\Path\\To\\node\\node_modules\\npm\\bin\\npm-cli.js" "install" "mapserv"
npm ERR! cwd C:\Path\To\node
npm ERR! node -v v0.8.22
npm ERR! npm -v 1.2.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Path\To\node\npm-debug.log
npm ERR! not ok code 0
Hi Alexandre,
Unfortunately I don't have the resources to support windows with node-mapserv: as specified in the Readme it's only guaranteed to work on a Linux OS. That's not to say it shouldn't be able to work with Windows as Mapserver itself compiles fine. Most of the work would be in getting the build system working properly: patches are always welcome!
Homme.
Hi Homme,
Thanks for the reply. Just to let you know, I cloned the repository and currently working on making the binding.gyp work for windows. If I get something working, I'll make a pull request.
Thanks again,
Alexandre
Hi Alexandre,
That's great - thanks and good luck with the windows bindings: they would be a great addition. I'm sure there are a few other projects out there that could provide some inspiration.
Regards,
Homme
Hi homme,
I just made a pull request with small fixes I had to do in order to build node-mapserv on Windows, see: https://github.com/geo-data/node-mapserv/pull/9
It required mapserver buildkit and source code to work. I was able to run vows successfully:
vows --spec test\mapserv-test.js
Re-opening this as a discussion point for a Windows port.