ionicframework - 使用ionic start ionic_demo2 sidemenu 命令新建官方app实例,缺少文件夹

查看:157
本文介绍了ionicframework - 使用ionic start ionic_demo2 sidemenu 命令新建官方app实例,缺少文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

目前问题描述:使用ionic start ionic_demo2 sidemenu 命令新建app,缺少文件夹

操作方式:
1.在E盘新建了 ionic_app 文件夹
2.dos命令符cd到ionic_app文件夹内

3.使用命令新建app ionic start ionic_demo3 sidemenu

过了很久就很长串报错信息

× Running command - failed!
[ERROR] An error occurred while running npm install (exit code 1):

    npm WARN deprecated object-keys@0.2.0: Please update to the latest object-keys
    npm WARN prefer global node-gyp@3.6.2 should be installed with -g

    > node-sass@4.5.3 install E:\ionic_app\ionic_demo2\node_modules\node-sass
    > node scripts/install.js

    Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-48_binding.node
    Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-48_binding.node":

    ESOCKETTIMEDOUT

    Hint: If github.com is not accessible in your location
    try setting a proxy via HTTP_PROXY, e.g.

    export HTTP_PROXY=http://example.com:1234

    or configure npm proxy via

    npm config set proxy http://example.com:8080

    > uglifyjs-webpack-plugin@0.4.6 postinstall E:\ionic_app\ionic_demo2\node_modules\uglifyjs-webpack-plugin
    > node lib/post_install.js

    > node-sass@4.5.3 postinstall E:\ionic_app\ionic_demo2\node_modules\node-sass
    > node scripts/build.js

    Binary found at E:\ionic_app\ionic_demo2\node_modules\node-sass\vendor\win32-x64-48\binding.node
    Testing binary
    Binary has a problem: Error: %1 is not a valid Win32 application.
    \\?\E:\ionic_app\ionic_demo2\node_modules\node-sass\vendor\win32-x64-48\binding.node
    at Error (native)
    at Object.Module._extensions..node (module.js:597:18)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at module.exports (E:\ionic_app\ionic_demo2\node_modules\node-sass\lib\binding.js:19:10)
    at Object.<anonymous> (E:\ionic_app\ionic_demo2\node_modules\node-sass\lib\index.js:14:35)
    at Module._compile (module.js:570:32)
    Building the binary locally
    Building: D:\Program Files\nodejs\node.exe E:\ionic_app\ionic_demo2\node_modules\node-gyp\bin\node-gyp.js
    rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
    gyp info it worked if it ends with ok
    gyp verb cli [ 'D:\\Program Files\\nodejs\\node.exe',
    gyp verb cli   'E:\\ionic_app\\ionic_demo2\\node_modules\\node-gyp\\bin\\node-gyp.js',
    gyp verb cli   'rebuild',
    gyp verb cli   '--verbose',
    gyp verb cli   '--libsass_ext=',
    gyp verb cli   '--libsass_cflags=',
    gyp verb cli   '--libsass_ldflags=',
    gyp verb cli   '--libsass_library=' ]
    gyp info using node-gyp@3.6.2
    gyp info using node@6.10.2 | win32 | x64
    gyp verb command rebuild []
    gyp verb command clean []
    gyp verb clean removing "build" directory
    gyp verb command configure []
    gyp verb check python checking for Python executable "python2" in the PATH
    gyp verb `which` failed Error: not found: python2
    gyp verb `which` failed     at getNotFoundError (E:\ionic_app\ionic_demo2\node_modules\which\which.js:13:12)
    gyp verb `which` failed     at F (E:\ionic_app\ionic_demo2\node_modules\which\which.js:68:19)
    gyp verb `which` failed     at E (E:\ionic_app\ionic_demo2\node_modules\which\which.js:80:29)
    gyp verb `which` failed     at E:\ionic_app\ionic_demo2\node_modules\which\which.js:89:16
    gyp verb `which` failed     at E:\ionic_app\ionic_demo2\node_modules\isexe\index.js:42:5
    gyp verb `which` failed     at E:\ionic_app\ionic_demo2\node_modules\isexe\windows.js:36:5
    gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:123:15)
    gyp verb `which` failed  python2 { Error: not found: python2
    gyp verb `which` failed     at getNotFoundError (E:\ionic_app\ionic_demo2\node_modules\which\which.js:13:12)
    gyp verb `which` failed     at F (E:\ionic_app\ionic_demo2\node_modules\which\which.js:68:19)
    gyp verb `which` failed     at E (E:\ionic_app\ionic_demo2\node_modules\which\which.js:80:29)
    gyp verb `which` failed     at E:\ionic_app\ionic_demo2\node_modules\which\which.js:89:16
    gyp verb `which` failed     at E:\ionic_app\ionic_demo2\node_modules\isexe\index.js:42:5
    gyp verb `which` failed     at E:\ionic_app\ionic_demo2\node_modules\isexe\windows.js:36:5
    gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:123:15)
    gyp verb `which` failed   stack: 'Error: not found: python2\n    at getNotFoundError
    (E:\\ionic_app\\ionic_demo2\\node_modules\\which\\which.js:13:12)\n    at F
    (E:\\ionic_app\\ionic_demo2\\node_modules\\which\\which.js:68:19)\n    at E
    (E:\\ionic_app\\ionic_demo2\\node_modules\\which\\which.js:80:29)\n    at
    E:\\ionic_app\\ionic_demo2\\node_modules\\which\\which.js:89:16\n    at
    E:\\ionic_app\\ionic_demo2\\node_modules\\isexe\\index.js:42:5\n    at
    E:\\ionic_app\\ionic_demo2\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:123:15)',
    gyp verb `which` failed   code: 'ENOENT' }
    gyp verb check python checking for Python executable "python" in the PATH
    gyp verb `which` failed Error: not found: python
    gyp verb `which` failed     at getNotFoundError (E:\ionic_app\ionic_demo2\node_modules\which\which.js:13:12)
    gyp verb `which` failed     at F (E:\ionic_app\ionic_demo2\node_modules\which\which.js:68:19)
    gyp verb `which` failed     at E (E:\ionic_app\ionic_demo2\node_modules\which\which.js:80:29)
    gyp verb `which` failed     at E:\ionic_app\ionic_demo2\node_modules\which\which.js:89:16
    gyp verb `which` failed     at E:\ionic_app\ionic_demo2\node_modules\isexe\index.js:42:5
    gyp verb `which` failed     at E:\ionic_app\ionic_demo2\node_modules\isexe\windows.js:36:5
    gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:123:15)
    gyp verb `which` failed  python { Error: not found: python
    gyp verb `which` failed     at getNotFoundError (E:\ionic_app\ionic_demo2\node_modules\which\which.js:13:12)
    gyp verb `which` failed     at F (E:\ionic_app\ionic_demo2\node_modules\which\which.js:68:19)
    gyp verb `which` failed     at E (E:\ionic_app\ionic_demo2\node_modules\which\which.js:80:29)
    gyp verb `which` failed     at E:\ionic_app\ionic_demo2\node_modules\which\which.js:89:16
    gyp verb `which` failed     at E:\ionic_app\ionic_demo2\node_modules\isexe\index.js:42:5
    gyp verb `which` failed     at E:\ionic_app\ionic_demo2\node_modules\isexe\windows.js:36:5
    gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:123:15)
    gyp verb `which` failed   stack: 'Error: not found: python\n    at getNotFoundError
    (E:\\ionic_app\\ionic_demo2\\node_modules\\which\\which.js:13:12)\n    at F
    (E:\\ionic_app\\ionic_demo2\\node_modules\\which\\which.js:68:19)\n    at E
    (E:\\ionic_app\\ionic_demo2\\node_modules\\which\\which.js:80:29)\n    at
    E:\\ionic_app\\ionic_demo2\\node_modules\\which\\which.js:89:16\n    at
    E:\\ionic_app\\ionic_demo2\\node_modules\\isexe\\index.js:42:5\n    at
    E:\\ionic_app\\ionic_demo2\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:123:15)',
    gyp verb `which` failed   code: 'ENOENT' }
    gyp verb could not find "python". checking python launcher
    gyp verb could not find "python". guessing location
    gyp verb ensuring that file exists: C:\Python27\python.exe
    gyp ERR! configure error
    gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
    gyp ERR! stack     at Object.failNoPython
    (E:\ionic_app\ionic_demo2\node_modules\node-gyp\lib\configure.js:483:19)
    gyp ERR! stack     at Object.<anonymous>
    (E:\ionic_app\ionic_demo2\node_modules\node-gyp\lib\configure.js:508:16)
    gyp ERR! stack     at E:\ionic_app\ionic_demo2\node_modules\graceful-fs\polyfills.js:284:29
    gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:123:15)
    gyp ERR! System Windows_NT 6.1.7601
    gyp ERR! command "D:\\Program Files\\nodejs\\node.exe"
    "E:\\ionic_app\\ionic_demo2\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext="
    "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
    gyp ERR! cwd E:\ionic_app\ionic_demo2\node_modules\node-sass
    gyp ERR! node -v v6.10.2
    gyp ERR! node-gyp -v v3.6.2
    gyp ERR! not ok
    Build failed with error code: 1
    ionic_demo2@0.0.1 E:\ionic_app\ionic_demo2
    +-- @angular/common@4.1.3
    +-- @angular/compiler@4.1.3
    +-- @angular/compiler-cli@4.1.3
    | +-- @angular/tsc-wrapped@4.1.3
    | | `-- tsickle@0.21.6
    | |   +-- mkdirp@0.5.1
    | |   | `-- minimist@0.0.8
    | |   +-- source-map@0.5.6
    | |   `-- source-map-support@0.4.15
    | +-- minimist@1.2.0
    | `-- reflect-metadata@0.1.10
    +-- @angular/core@4.1.3
    +-- @angular/forms@4.1.3
    +-- @angular/http@4.1.3
    +-- @angular/platform-browser@4.1.3
    +-- @angular/platform-browser-dynamic@4.1.3
    +-- @ionic-native/core@3.12.1
    +-- @ionic-native/splash-screen@3.12.1
    +-- @ionic-native/status-bar@3.12.1
    +-- @ionic/storage@2.0.1
    | +-- @types/localforage@0.0.30
    | +-- localforage@1.4.3
    | | `-- lie@3.0.2
    | |   +-- es3ify@0.1.4
    | |   | +-- esprima-fb@3001.1.0-dev-harmony-fb
    | |   | +-- jstransform@3.0.0
    | |   | | +-- base62@0.1.1
    | |   | | `-- source-map@0.1.31
    | |   | |   `-- amdefine@1.0.1
    | |   | `-- through@2.3.8
    | |   +-- immediate@3.0.6
    | |   +-- inline-process-browser@1.0.0
    | |   | +-- falafel@1.2.0
    | |   | | +-- acorn@1.2.2
    | |   | | +-- foreach@2.0.5
    | |   | | `-- object-keys@1.0.11
    | |   | `-- through2@0.6.5
    | |   |   +-- readable-stream@1.0.34
    | |   |   | +-- core-util-is@1.0.2
    | |   |   | +-- inherits@2.0.3
    | |   |   | `-- string_decoder@0.10.31
    | |   |   `-- xtend@4.0.1
    | |   `-- unreachable-branch-transform@0.3.0
    | |     +-- esmangle-evaluator@1.0.1
    | |     `-- recast@0.10.43
    | |       +-- ast-types@0.8.15
    | |       +-- esprima-fb@15001.1001.0-dev-harmony-fb
    | |       `-- private@0.1.7
    | `-- localforage-cordovasqlitedriver@1.5.0
    +-- ansi-regex@2.1.1  extraneous
    +-- babel-code-frame@6.22.0  extraneous
    +-- babel-core@6.25.0  extraneous
    +-- d@1.0.0  extraneous
    +-- ionic-angular@3.5.0
    +-- ionicons@3.0.0
    +-- rxjs@5.4.0
    | `-- symbol-observable@1.0.4
    +-- sw-toolbox@3.6.0
    | +-- path-to-regexp@1.7.0
    | | `-- isarray@0.0.1
    | `-- serviceworker-cache-polyfill@4.0.0
    +-- typescript@2.3.4
    `-- zone.js@0.8.12

    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted
    {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
    npm WARN ajv-keywords@2.1.0 requires a peer of ajv@>=5.0.0 but none was installed.
    npm ERR! Windows_NT 6.1.7601
    npm ERR! argv "D:\\Program Files\\nodejs\\node.exe" "D:\\Program
    Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
    npm ERR! node v6.10.2
    npm ERR! npm  v3.10.10
    npm ERR! code ELIFECYCLE

    npm ERR! node-sass@4.5.3 postinstall: `node scripts/build.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the node-sass@4.5.3 postinstall script 'node scripts/build.js'.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the node-sass package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR!     node scripts/build.js
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR!     npm bugs node-sass
    npm ERR! Or if that isn't available, you can get their info via:
    npm ERR!     npm owner ls node-sass
    npm ERR! There is likely additional logging output above.

    npm ERR! Please include the following file with any support request:
    npm ERR!     E:\ionic_app\ionic_demo2\npm-debug.log

我看到有个警告说没有安装 Git CLI ,然后去官网看了安装方法
npm install git-cli

然后又是一堆错误,今天一天都在搞这个,头都大了,求大神帮忙解答下!万分感谢,跪谢

具体疑问点:
1.npm我已经装了,为什么还有npm install

2.疑问2背景:最开始我使用Ionic看的是 这个网站(http://www.ionic.wang/js_doc-...),点击导航上的[赞助教程]到了个,phonegap100的网站,然后看里面的教程看了半天,感觉被带歪了的感觉,研究了好久的phonegap,感觉不对劲,今天才转身重来
疑问2:使用Ionic开发app,也需要安装Android sdk吗?也需要安装什么ant吗?

提此问题的主要目的就是,我想能够正常的使用Ionic创建官网实例,从而达到自己使用Ionic做自己的app

不知道是我的方法有问题还是怎么了,一直没有进度,希望能有人指导下,谢谢了

解决方案

问题目前已经解决,大致原因可能是:

  1. npm通过官网安装,安装不完整,导致。
    解决方法,使用国内镜像进行安装,具体安装方法:http://www.cnblogs.com/fighxp...
  2. 执行完 ionic start myApp tabs后,还需切换到应用文件夹内,执行ionic serve才 www文件夹内才会生成对应文件,且会自动打开电脑默认浏览器进行预览

这篇关于ionicframework - 使用ionic start ionic_demo2 sidemenu 命令新建官方app实例,缺少文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆