MSB1009:项目文件不存在
Posted
技术标签:
【中文标题】MSB1009:项目文件不存在【英文标题】:MSB1009 : Project file does not exist 【发布时间】:2019-06-17 21:40:18 【问题描述】:我正在尝试安装 Web3 js。它给了我 MSBUILD 的错误。我无法继续。
我已尝试安装新版本的 node.js。但我仍然无法成功安装 Web3 js。
npm install web3
C:\Windows\System32>npm install web3
npm WARN deprecated fs-promise@2.0.3: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated tar.gz@1.0.7: ⚠️ WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar
> scrypt@6.0.3 preinstall C:\Windows\System32\node_modules\scrypt
> node node-scrypt-preinstall.js
> scrypt@6.0.3 install C:\Windows\System32\node_modules\scrypt
> node-gyp rebuild
C:\Windows\System32\node_modules\scrypt>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 )
Warning: Missing input files:
C:\Windows\System32\node_modules\scrypt\build\..\scrypt\win\include\config.h
MSBUILD : error MSB1009: Project file does not exist.
Switch: build/binding.sln
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:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240: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:\Windows\System32\node_modules\scrypt
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\Windows\System32\package.json'
npm WARN prop-types-extra@1.1.0 requires a peer of react@>=0.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-bootstrap@0.32.4 requires a peer of react@^0.14.9 || >=15.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-bootstrap@0.32.4 requires a peer of react-dom@^0.14.9 || >=15.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-overlays@0.8.3 requires a peer of react@^0.14.9 || >=15.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-overlays@0.8.3 requires a peer of react-dom@^0.14.9 || >=15.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-prop-types@0.4.0 requires a peer of react@>=0.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-transition-group@2.5.3 requires a peer of react@>=15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-transition-group@2.5.3 requires a peer of react-dom@>=15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN uncontrollable@5.1.0 requires a peer of react@>=15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN System32 No description
npm WARN System32 No repository field.
npm WARN System32 No README data
npm WARN System32 No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt@6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
【问题讨论】:
【参考方案1】:我收到了同样的错误信息。我在cmd中执行了“node-gyp configure”,发现没有找到Python。所以我安装了 Python 2.7 安装python后错误消失了。
【讨论】:
以上是关于MSB1009:项目文件不存在的主要内容,如果未能解决你的问题,请参考以下文章
“错误 MSB1009:项目文件不存在。”使用竹子部署 asp.net 项目时
cmake cmake MSBUILD : error MSB1009: 项目文件不存在 or MSBuild.exe not find !
cmake cmake MSBUILD : error MSB1009: 项目文件不存在 or MSBuild.exe not find !