Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/design-patterns/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 无法运行nodejs项目-npm错误!代码EBADPLATFORM_Node.js_Git_Npm_Node Gyp - Fatal编程技术网

Node.js 无法运行nodejs项目-npm错误!代码EBADPLATFORM

Node.js 无法运行nodejs项目-npm错误!代码EBADPLATFORM,node.js,git,npm,node-gyp,Node.js,Git,Npm,Node Gyp,我是nodeJS的新手,所以这可能是个愚蠢的问题 我刚刚安装了NoDEJS、节点GYP、NPM、Git、Python和MS VisualStudioC++快件。p> 当我执行“npm安装”时,我得到以下输出: npm WARN package.json strider@1.6.6 No license field. > contextify@0.1.14 install C:\Users\W7\Documents\GitHub\strider\node_modules\angular\n

我是nodeJS的新手,所以这可能是个愚蠢的问题

我刚刚安装了NoDEJS、节点GYP、NPM、Git、Python和MS VisualStudioC++快件。p> 当我执行

“npm安装”
时,我得到以下输出:

npm WARN package.json strider@1.6.6 No license field.

> contextify@0.1.14 install C:\Users\W7\Documents\GitHub\strider\node_modules\angular\node_modules\jsdom\node_modules\contextify
> node-gyp rebuild


C:\Users\W7\Documents\GitHub\strider\node_modules\angular\node_modules\jsdom\node_modules\contextify>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(42,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install Visual Studio 2010 to build using the Visual Studio 2010 build tools. [C:\Users\W7\Documents\GitHub\strider\node_modules\angular\node_modules\jsdom\node_modules\contextify\build\contextify.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\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:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\W7\Documents\GitHub\strider\node_modules\angular\node_modules\jsdom\node_modules\contextify
gyp ERR! node -v v0.12.5
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.5
npm ERR! npm  v2.11.2
npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your operating system or architecture: n@1.3.0
npm ERR! notsup Valid OS:    !win32
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   win32
npm ERR! notsup Actual Arch: x64

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\W7\Documents\GitHub\strider\npm-debug.log
我可能遗漏了什么,有人知道如何修复吗


我正在使用Windows 7 64。

更改您的软件包或操作系统,此操作系统不支持此软件包。

您正在尝试在Windows下安装
n
软件包。在他们的github页面()上声明,它不能在windows上本机工作

(注意:
n
在Windows上本机不受支持。)

你们可以试试这个软件包,但我从来没用过

或者,您可以在您的机器上进行设置。我每天都用,可以推荐


编辑:我刚刚读到你正在运行Windows7,而WSL只在Windows10上工作。我建议升级。

在安装之前,您是否尝试过npm更新?您能否提供有关此更新的更多详细信息?