如何解决以下本机脚本代码共享应用创建错误?

时间:2019-06-25 08:53:24

标签: angular2-nativescript nativescript-codesharing

我是nativescript的初学者,并且在使用CLI创建共享新应用程序的nativescript角度代码时遇到错误

我正在尝试ng new -c = @ nativescript / schematics ns-oys --shared --style = scss命令来创建新的应用程序。

gyp动词检查python在PATH中检查Python可执行文件“ python2” gyp动词which失败错误:找不到:python2 gyp动词which在getNotFoundError失败(F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:13:12) gyp动词which在F处失败(F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:68:19) gyp动词which在E处失败(F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:80:29) gyp动词which在F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:89:16失败 gyp动词which在F:\ Work \ ns \ ns-oys \ node_modules \ isexe \ index.js:42:5失败 gyp动词which在F:\ Work \ ns \ ns-oys \ node_modules \ isexe \ windows.js:36:5失败 gyp动词which在FSReqCallback.oncomplete失败(fs.js:149:21) gyp动词which失败python2错误:未找到:python2 gyp动词which在getNotFoundError失败(F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:13:12) gyp动词which在F处失败(F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:68:19) gyp动词which在E处失败(F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:80:29) gyp动词which在F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:89:16失败 gyp动词which在F:\ Work \ ns \ ns-oys \ node_modules \ isexe \ index.js:42:5失败 gyp动词which在F:\ Work \ ns \ ns-oys \ node_modules \ isexe \ windows.js:36:5失败 gyp动词which在FSReqCallback.oncomplete失败(fs.js:149:21){ gyp动词which失败堆栈:'错误:找不到:getNotFoundError处的python2 \ n'+ gyp动词which在F处失败'(F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:13:12)\ n gyp动词which在E上失败'(F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:68:19)\ n gyp动词which失败'(F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:80:29)\ n在'+ gyp动词which在'+失败'F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:89:16 \ n gyp动词which在'+失败'F:\ Work \ ns \ ns-oys \ node_modules \ isexe \ index.js:42:5 \ n gyp动词which在'+:F:\ Work \ ns \ ns-oys \ node_modules \ isexe \ windows.js:36:5 \ n失败 gyp动词which失败'FSReqCallback.oncomplete(fs.js:149:21)', gyp动词which失败的代码:“ ENOENT” gyp动词which失败} gyp动词检查python在PATH中检查Python可执行文件“ python” gyp动词which失败错误:找不到:python gyp动词which在getNotFoundError失败(F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:13:12) gyp动词which在F处失败(F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:68:19) gyp动词which在E处失败(F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:80:29) gyp动词which在F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:89:16失败 gyp动词which在F:\ Work \ ns \ ns-oys \ node_modules \ isexe \ index.js:42:5失败 gyp动词which在F:\ Work \ ns \ ns-oys \ node_modules \ isexe \ windows.js:36:5失败 gyp动词which在FSReqCallback.oncomplete失败(fs.js:149:21) gyp动词which失败python错误:找不到:python gyp动词which在getNotFoundError失败(F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:13:12) gyp动词which在F处失败(F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:68:19) gyp动词which在E处失败(F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:80:29) gyp动词which在F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:89:16失败 gyp动词which在F:\ Work \ ns \ ns-oys \ node_modules \ isexe \ index.js:42:5失败 gyp动词which在F:\ Work \ ns \ ns-oys \ node_modules \ isexe \ windows.js:36:5失败 gyp动词which在FSReqCallback.oncomplete失败(fs.js:149:21){ gyp动词which失败堆栈:'错误:找不到:python \ n在getNotFoundError'+ gyp动词which在F处失败'(F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:13:12)\ n gyp动词which在E上失败'(F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:68:19)\ n gyp动词which失败'(F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:80:29)\ n在'+ gyp动词which在'+失败'F:\ Work \ ns \ ns-oys \ node_modules \ which \ which.js:89:16 \ n gyp动词which在'+失败'F:\ Work \ ns \ ns-oys \ node_modules \ isexe \ index.js:42:5 \ n gyp动词which在'+:F:\ Work \ ns \ ns-oys \ node_modules \ isexe \ windows.js:36:5 \ n失败 gyp动词which失败'FSReqCallback.oncomplete(fs.js:149:21)', gyp动词which失败的代码:“ ENOENT” gyp动词which失败} gyp动词找不到“ python”。检查python启动器 gyp动词找不到“ python”。猜测位置 gyp动词,确保该文件存在:C:\ Python27 \ python.exe 糟糕!配置错误 糟糕!错误:找不到Python可执行文件“ python”,可以设置PYTHON env变量。 糟糕!堆叠在PythonFinder.failNoPython(F:\ Work \ ns \ ns-oys \ node_modules \ node-gyp \ lib \ configure.js:484:19) 糟糕!放在PythonFinder中。 (F:\ Work \ ns \ ns-oys \ node_modules \ node-gyp \ lib \ configure.js:509:16) 糟糕!堆叠在F:\ Work \ ns \ ns-oys \ node_modules \ graceful-fs \ polyfills.js:282:31 糟糕! FSReqCallback.oncomplete处的堆栈(fs.js:149:21) 糟糕!系统Windows_NT 10.0.17134 糟糕!命令“ E:\ anup \ programFile \ node \ node.exe”“ F:\ Work \ ns \ ns-oys \ node_modules \ node-gyp \ bin \ node-gyp.js”“重建”“ --verbose”“ --libsass_ext =“” --libsass_cflags =“” --libsass_ldflags =“” --libsass_library =“ 糟糕! cwd F:\ Work \ ns \ ns-oys \ node_modules \ node-sass 糟糕!节点-v v12.3.1 糟糕!节点gyp -v v3.8.0 糟糕!不好 生成失败,错误代码:1 npm WARN codelyzer@4.2.1要求对等体@ angular / compiler @> = 2.3.1 <7.0.0 || > 6.0.0-beta <7.0.0,但未安装。您必须自己安装对等依赖项。 npm WARN codelyzer@4.2.1要求对等体@ angular / core @> = 2.3.1 <7.0.0 || > 6.0.0-beta <7.0.0,但未安装。您必须自己安装对等依赖项。 npm WARN codelyzer@4.2.1需要一个对等体@ angular / platform-b​​rowser-dynamic @> = 2.3.1 <7.0.0 || > 6.0.0-beta <7.0.0,但未安装。您必须自己安装对等依赖项。 npm WARN codelyzer@4.2.1要求对等体@ angular / platform-b​​rowser @> = 2.3.1 <7.0.0 || > 6.0.0-beta <7.0.0,但未安装。您必须安装对等 自己依赖。 npm WARN codelyzer@4.2.1要求对等体@ angular / common @> = 2.3.1 <7.0.0 || > 6.0.0-beta <7.0.0,但未安装。您必须自己安装对等依赖项。 npm WARN ajv-keywords@3.4.0需要ajv@^6.9.1的同位体,但未安装。您必须自己安装对等依赖项。 npm警告可选的跳过可选依赖性:fsevents@1.2.9(node_modules \ fsevents): npm WARN notsup跳过依赖项:fsevents@1.2.9不受支持的平台:通缉{“ os”:“ darwin”,“ arch”:“ any”}(当前:{“ os”:“ win32”,“ arch”: “ x64”})

npm错误!代码ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.10.0安装后:node scripts/build.js npm ERR!退出状态1 npm ERR! npm ERR!在node-sass@4.10.0安装后脚本失败。 npm ERR! npm可能不是问题。上面可能还有其他日志记录输出。

npm错误!可以在以下位置找到此运行的完整日志:

1 个答案:

答案 0 :(得分:0)

使用命令npm i -g @ angular / cli更新angular cli,该命令开始工作。