windows上的Jhipster uml安装问题:NPM在msbuild.exe上失败,退出代码为1
嗨,我一直在尝试使用Thread和npm工具安装jhipster uml。但最终会出错。早些时候,为了满足npm的需求,不得不将Python版本从3.6降到2.7。另外,根据一些帖子,我们使用npm安装了windows visual studio。 但问题依然存在。请在下面查找错误。让我知道有谁遇到过类似的情况并解决了吗 我的机器是运行在英特尔i5内核8 gb ram上的windows 10 如果需要我方提供更多详细信息,请告诉我 更新:windows上的Jhipster uml安装问题:NPM在msbuild.exe上失败,退出代码为1,npm,window,jhipster,yarnpkg,Npm,Window,Jhipster,Yarnpkg,嗨,我一直在尝试使用Thread和npm工具安装jhipster uml。但最终会出错。早些时候,为了满足npm的需求,不得不将Python版本从3.6降到2.7。另外,根据一些帖子,我们使用npm安装了windows visual studio。 但问题依然存在。请在下面查找错误。让我知道有谁遇到过类似的情况并解决了吗 我的机器是运行在英特尔i5内核8 gb ram上的windows 10 如果需要我方提供更多详细信息,请告诉我 更新: 试着从楼梯上走几步也没有多大帮助。在这里我不能 inst
C:\Windows>yarn global add jhipster-uml
yarn global v1.3.2
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/1] ⠁ deasync: Build failed
[-/1] ⠁ waiting...
[-/1] ⠁ waiting...
[-/1] ⠁ waiting...
error C:\Users\ameya.shetti\AppData\Local\Yarn\config\global\node_modules\deasync: Command failed.
Exit code: 1
Command: node ./build.js
Arguments:
Directory: C:\Users\ameya.shetti\AppData\Local\Yarn\config\global\node_modules\deasync
Output:
C:\Users\ameya.shetti\AppData\Local\Yarn\config\global\node_modules\deasync>if not defined npm_config_node_gyp (node "D:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@9.3.0 | win32 | x64
gyp info spawn C:\Users\ameya.shetti\.windows-build-tools\python27\python.exe
gyp info spawn args [ 'D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\ameya.shetti\\AppData\\Local\\Yarn\\config\\global\\node_modules\\deasync\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\ameya.shetti\\.node-gyp\\9.3.0\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\ameya.shetti\\.node-gyp\\9.3.0',
gyp info spawn args '-Dnode_gyp_dir=D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\ameya.shetti\\.node-gyp\\9.3.0\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\Users\\ameya.shetti\\AppData\\Local\\Yarn\\config\\global\\node_modules\\deasync',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\Users\\my.pc\\AppData\\Local\\Yarn\\config\\global\\node_modules\\deasync\\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Users\ameya.shetti\AppData\Local\Yarn\config\global\node_modules\deasync\build\deasync.vcxproj(20,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.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 (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:159:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ameya.shetti\AppData\Local\Yarn\config\global\node_modules\deasync
gyp ERR! node -v v9.3.0
C:\Windows>npm install -g jhipster-uml
C:\Users\ameya.shetti\AppData\Roaming\npm\node_modules\jhipster-uml\node_modules\deasync>if not defined npm_config_node_gyp (node "C:\Users\ameya.shetti\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\ameya.shetti\AppData\Roaming\npm\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\ameya.shetti\AppData\Roaming\npm\node_modules\jhipster-uml\node_modules\deasync\build\deasync.vcxproj(20,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.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:\Users\ameya.shetti\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:159:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ameya.shetti\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ameya.shetti\AppData\Roaming\npm\node_modules\jhipster-uml\node_modules\deasync
gyp ERR! node -v v9.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! deasync@0.1.9 install: `node ./build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the deasync@0.1.9 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\ameya.shetti\AppData\Roaming\npm-cache\_logs\2017-12-20T04_45_39_859Z-debug.log
C:\Windows>warn全局添加jhipster uml
纱线全球v1.3.2
[1/4]正在解析包。。。
[2/4]正在获取包。。。
[3/4]链接依赖项。。。
[4/4]构建新的包。。。
[1/1] ⠁ 取消同步:生成失败
[-/1] ⠁ 等待。。。
[-/1] ⠁ 等待。。。
[-/1] ⠁ 等待。。。
错误C:\Users\ameya.shetti\AppData\Local\thread\config\global\node\u modules\deasync:命令失败。
退出代码:1
命令:node./build.js
论据:
目录:C:\Users\ameya.shetti\AppData\Local\thread\config\global\node\u modules\deasync
输出:
C:\Users\ameya.shetti\AppData\Local\warn\config\global\node\u modules\deasync>如果未定义npm\u config\u node\u gyp(节点“D:\Program Files\nodejs\node\u modules\npm\bin\node gyp bin\\\\\\\\\\\\\\\ node\u modules\node gyp.js“重建)其他(节点“重建”)
gyp信息如果以ok结尾,它就起作用了
gyp信息使用节点-gyp@3.6.2
gyp信息使用node@9.3.0| win32 | x64
gyp信息生成C:\Users\ameya.shetti\.windows构建工具\python27\python.exe
gyp info spawn args['D:\\Program Files\\nodejs\\node\u modules\\npm\\node\u modules\\node gyp\\gyp\\gyp\u main.py',
gyp信息生成参数“binding.gyp”,
gyp信息产卵参数'-f',
gyp信息生成参数“MSV”,
gyp信息产卵参数'-G',
gyp信息生成参数'msvs_version=auto',
gyp信息产卵参数'-I',
gyp info spawn args'C:\\Users\\ameya.shetti\\AppData\\Local\\纱线\\config\\global\\node\u modules\\deasync\\build\\config.gypi',
gyp信息产卵参数'-I',
gyp info spawn args'D:\\Program Files\\nodejs\\node\u modules\\npm\\node\u modules\\node gyp\\addon.gypi',
gyp信息产卵参数'-I',
gyp info spawn args'C:\\Users\\ameya.shetti\\.node gyp\\9.3.0\\include\\node\\common.gypi',
gyp info spawn args'-Dlibrary=shared_library',
gyp信息生成参数“-Dvisibility=default”,
gyp info spawn args'-Dnode\u root\u dir=C:\\Users\\ameya.shetti\\\.node gyp\\9.3.0',
gyp info spawn args'-Dnode\U gyp\U dir=D:\\Program Files\\nodejs\\node\U modules\\npm\\node\U modules\\node gyp',
gyp info spawn args'-Dnode_lib_file=C:\\Users\\ameya.shetti\\.node gyp\\9.3.0\\最终解决了这个问题
事实上,我已经解决了上述问题,并试图安装jhipster microservice,但我遇到了同样的问题。因此,我重试了所有以前不起作用的步骤。这次解决了
所以我对解决上述问题的观察是
1.npm安装--全局--生产windows构建工具
使用命令提示符(管理)[右键单击开始菜单(win 10)在列表中查找选项。]
这将安装python 2.7和vc studio 2015。即使您安装python并在环境变量中设置路径,npm也不会检测到,直到您执行此步骤
2.使用同一个admin power shell在jhipster注册表主机上运行THEAN命令并成功执行。使用同一个power shell使用THEAN global add jhipster uml安装jhipster uml
这起作用了
结论:对于jhipster uml来说,它需要ms visual studio依赖项和管理员权限,才能使用windows构建工具运行一些.cp文件