Open ouydon opened 5 years ago
This is a known issue of cmake-js
: https://github.com/cmake-js/cmake-js/issues/160
A quick fix is appending this in the cmake-js cmdline: -G"Visual Studio 15 2017 Win64"
@fs-eire Thank you very much!
I HAD THE SAME ISSUE. But my problem was, I had Cygwin installed, and Cygwin had their own built-in version of C-make. What I did was- untie Cygwin from my command prompt (cmd), then rebuilt it. It then worked. Make sure you don't have something tied into your command prompt (cmd), like Cygwin, because they have their own version of 'Cmake'.
One way of checking this out is by typing in 'cygwin' into your command prompt (cmd), or into your search, and try tracing its file origin, and try removing its ties from command prompt, or by just uninstalling the app which utilizes a different version of Cmake.
use electron-quick-start add napajs
D:\project> node -v v10.15.3
download https://github.com/Kitware/CMake/releases/download/v3.14.0-rc4/cmake-3.14.0-rc4-win64-x64.msi
install cmake
D:\project>cmake -version cmake version 3.14.0-rc4
D:\project>npm install -g cmake-js D:\project>cmake-js --version
[ 'D:\Program Files\nodejs\node.exe', 'C:\Users\MyPC\AppData\Roaming\npm\node_modules\cmake-js\bin\cmake-js', '--version' ] 5.1.0
D:\project> git clone https://github.com/electron/electron-quick-start D:\project> cd electron-quick-start D:\project\electron-quick-start> npm install D:\project\electron-quick-start> npm install napajs --save
goto https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017 websize
D:\project\electron-quick-start>cd node_modules\napajs\
package.json
{ "_from": "napajs", "_id": "napajs@0.2.3", "_inBundle": false, "_integrity": "sha512-42KQsVd8rUBs8+OtUh99R0ID5+u0895XMITgfRdmKxvhV1p9zo41gX/J5yxwONpTJfMyALGh62WiN4CmSXaMIw==", "_location": "/napajs", "_phantomChildren": {}, "_requested": { "type": "tag", "registry": true, "raw": "napajs", "name": "napajs", "escapedName": "napajs", "rawSpec": "", "saveSpec": null, "fetchSpec": "latest" }, "_requiredBy": [ "#USER", "/" ], "_resolved": "https://registry.npmjs.org/napajs/-/napajs-0.2.3.tgz", "_shasum": "51b3f946f0b517ea73915c48c9b9b93a5971e8c4", "_spec": "napajs", "_where": "D:\project\electron-quick-start", "author": { "name": "napajs" }, "binary": { "module_name": "napa-binding", "module_path": "./bin/", "host": "https://github.com/Microsoft/napajs/releases/download/", "remote_path": "{version}" }, "bugs": { "url": "https://github.com/Microsoft/napajs/issues" }, "bundleDependencies": false, "dependencies": { "node-pre-gyp": "^0.6.36", "npmlog": "^4.1.2", "semver": "^5.5.0" }, "deprecated": false, "description": "Napa.js is a multi-threaded JavaScript runtime built on V8", "devDependencies": { "@types/mocha": "^2.2.41", "@types/node": "^8.0.22", "markdown-table": "^1.1.1", "mocha": "^3.5.0", "node-pre-gyp-github": "^1.3.1", "typescript": "^2.4.2" }, "homepage": "https://github.com/Microsoft/napajs#readme", "license": "MIT", "main": "./lib/index.js", "name": "napajs", "repository": { "type": "git", "url": "git+https://github.com/Microsoft/napajs.git" }, "cmake-js": { "runtime": "electron", "runtimeVersion": "4.0.7", "arch": "x64" }, "scripts": { "benchmark": "node benchmark/bench.js", "install": "node scripts/install.js", "prepare": "tsc -p lib && tsc -p test && tsc -p benchmark", "rebuild": "cmake-js rebuild && tsc -p lib", "rebuildd": "cmake-js rebuild --debug && tsc -p lib", "retest": "cmake-js rebuild -d test/module/addon && tsc -p test && mocha test --recursive", "reunittest": "cmake-js rebuild -d unittest && node unittest/run.js", "test": "mocha test -g \"^((?!napajs/timers).)*$\" --recursive && mocha test -g \"^napajs/timers\"", "unittest": "cmake-js compile -d unittest && node unittest/run.js" }, "types": "./types/index.d.ts", "version": "0.2.3" }
================================================
D:\project\electron-quick-start\node_modules\napajs> cmake-js rebuild
[ 'D:\Program Files\nodejs\node.exe', 'C:\Users\MyPC\AppData\Roaming\npm\node_modules\cmake-js\bin\cmake-js', 'rebuild' ] info TOOL Using Visual Studio 15 2017 Win64 Win64 generator. info CMD CLEAN info RUN cmake -E remove_directory "D:\project\electron-quick-start\node_modules\napajs\build" info CMD CONFIGURE info RUN cmake "D:\project\electron-quick-start\node_modules\napajs" --no-warn-unused-cli -G"Visual Studio 15 2017 Win64 Win64" -DCMAKE_JS_VERSION="5.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_RUNTIME_OUTPUT_DIRECTORY="D:\project\electron-quick-start\node_modules\napajs\build" -DCMAKE_JS_INC="C:\Users\MyPC.cmake-js\electron-x64\v4.0.7\include\node" -DNODE_RUNTIME="electron" -DNODE_RUNTIMEVERSION="4.0.7" -DNODE_ARCH="x64" -DCMAKE_JS_LIB="C:\Users\MyPC.cmake-js\electron-x64\v4.0.7\x64\node.lib" Not searching for unused variables given on the command line. CMake Error: Could not create named generator Visual Studio 15 2017 Win64 Win64
Generators Visual Studio 16 2019 = Generates Visual Studio 2019 project files. Use -A option to specify architecture.
ERR! OMG Process terminated: 1
Ask each master to help see this problem, thank you.