【问题标题】:Ionic "Error with start undefined" after python3python3之后的离子“启动未定义错误”
【发布时间】:2019-01-25 14:27:36
【问题描述】:

当我运行ionic start helloWorld blank 时,我收到以下错误:

Error with start undefined
Error Initializing app: There was an error with the spawned command: npminstall

当我最后一次尝试时(几个月前),上面的命令没有错误。现在我尝试更新ionic,但还是同样的错误。

我最近使用 Anaconda 来获取 python3。所以我担心这可能与此有关。我尝试了别名(建议使用 here),但仍然遇到同样的错误。

我尝试通过 anaconda 降级,使用

conda install python=2.7.3

但仍然从 ionic 得到相同的错误。

运行 ionic info 提供以下输出:

Cordova CLI: 6.5.0 
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
ios-deploy version: 1.9.0 
ios-sim version: 5.0.8 
OS: macOS
Node Version: v9.4.0
Xcode version: Xcode 9.4.1 Build version 9F2000

运行npm -v 显示5.6.0

【问题讨论】:

  • 你能告诉我们ionic infonpm -v的输出吗?
  • @gregory - 我将其添加到问题中
  • 当你更新时,你是否:(1)brew升级节点; (2) npm install -g npm, (3) npm 设置注册表registry.npmjs.org?
  • @gregory 我记不太清了,但是 npm install -g npm 看起来很熟悉
  • 你能(重新)尝试这三个步骤来看看你得到了什么吗?

标签: python macos ionic-framework npm


【解决方案1】:

原来我在降级到 2.7 后仍然需要这样做

npm config set python $(which python)

【讨论】:

    【解决方案2】:

    我遇到了同样的问题,这些步骤帮助了我:

    1. 卸载离子npm uninstall ionic -g
    2. 缓存清理npm cache clean --force
    3. 更新 npm npm i npm -g
    4. 全局安装 ionic npm i ionic -g

    【讨论】:

    猜你喜欢
    • 2018-10-08
    • 2018-04-11
    • 1970-01-01
    • 1970-01-01
    • 2022-11-07
    • 1970-01-01
    • 2014-08-15
    • 1970-01-01
    • 2021-11-28
    相关资源
    最近更新 更多