【发布时间】:2016-09-01 21:29:30
【问题描述】:
我正在与一个远程团队一起开发 Ionic 1 应用程序,最近我们的版本互不喜欢。我想知道我是否也一直在从事 Ionic 2 项目,无论出于何种原因,我的 CLI “认为”这些应用程序也是 Ionic 2 并且在那里向我射击以下错误?
离子构建 ios
WARN: ionic.project has been renamed to ionic.config.json, please rename it.
(node:9061) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Uh oh! Looks like you're missing a module in your gulpfile:
Cannot find module 'bower'
Do you need to run `npm install`?
我已经运行了 npm install.. 并没有让它消失.. 我还确保安装了 bower。
这与这里有什么关系?我已经被困在这里几天了。
更新
我去了一个旧项目,我尝试运行 ionic info 以查看我拥有的版本和系统信息,但我收到了相同的错误消息..
我不知道我做了什么来得到这个......
mymac ~/code/92_AAC/newApp on master[!]
$ ionic info
WARN: ionic.project has been renamed to ionic.config.json, please rename it.
Uh oh! Looks like you're missing a module in your gulpfile:
Cannot find module 'gulp'
Do you need to run `npm install`?
更新 2
我从 Node 6 降级到 Node 5.9 在当前项目中,我遇到了最初的问题。我得到了这个。
$ ionic build ios
******************************************************
Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:
Install ios-sim to deploy iOS applications. `npm install -g ios-sim` (may require sudo)
Install ios-deploy to deploy iOS applications to devices. `npm install -g ios-deploy` (may require sudo)
******************************************************
WARN: ionic.project has been renamed to ionic.config.json, please rename it.
(node:11866) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Uh oh! Looks like you're missing a module in your gulpfile:
Cannot find module 'bower'
Do you need to run `npm install`?
我的离子信息(终于可以打印出来了)
您的系统信息:
Cordova CLI: 6.1.1
Gulp version: CLI version 1.2.1
Gulp local:
Ionic Version: 1.2.4
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
ios-deploy version: 1.8.6
ios-sim version: 5.0.3
OS: Mac OS X El Capitan
Node Version: v5.9.1
Xcode version: Xcode 7.3.1 Build version 7D1014
更新 3 在@janos 建议之后
我运行了 npm install bower,它运行并安装了一些模块,但我得到了以下..
- 单击此链接可查看我的命令行更详细的屏幕截图 Screen Shot here!
```
$ 离子构建 ios 警告:ionic.project 已重命名为 ionic.config.json,请重命名。 (node:12122) fs: 不支持重新评估本机模块源。如果您使用的是 graceful-fs 模块,请将其更新到更新的版本。 您的 gulpfile 中有错误: 错误:ENOENT:没有这样的文件或目录,scandir '/Users/abelista/code/inov/cornerstone/inov/a4c/passengerApp/trunk/passenger/node_modules/gulp-sass/node_modules/node-sass/vendor' 在错误(本机) 在 Object.fs.readdirSync (fs.js:945:18) 在 Object.getInstalledBinaries (/Users/abelista/code/inov/cornerstone/inov/a4c/passengerApp/trunk/passenger/node_modules/gulp-sass/node_modules/node-sass/lib/extensions.js:74:13) 在foundBinariesList(/Users/abelista/code/inov/cornerstone/inov/a4c/passengerApp/trunk/passenger/node_modules/gulp-sass/node_modules/node-sass/lib/errors.js:20:15) 在foundBinaries(/Users/abelista/code/inov/cornerstone/inov/a4c/passengerApp/trunk/passenger/node_modules/gulp-sass/node_modules/node-sass/lib/errors.js:15:5) 在 Object.module.exports.missingBinary (/Users/abelista/code/inov/cornerstone/inov/a4c/passengerApp/trunk/passenger/node_modules/gulp-sass/node_modules/node-sass/lib/errors.js:45: 5) 在对象。 (/Users/abelista/code/inov/cornerstone/inoabelista
```
- 列表项:主要错误(A4CPassenger@1.1.1 - 不知道该怎么称呼它..但这基本上是应用程序的名称?我相信远程团队更改了它..无论出于何种原因我仍然得到旧名..)
【问题讨论】:
-
尝试运行
npm install bower,然后再次运行ionic build ios -
@janos 你好! :D 我做到了.. 查看我的更新 3.. 它“有效”,但我认为我的文件有问题..
-
在其中一个步骤中,您将 Node.js 降级。我会重新开始,而不是降级 Node.js。另请记住,当您收到
Cannot find module 'blah' Do you need to run "npm install"?之类的消息时,它真的希望您这样做npm install blah -
@janos 你不认为没有来自 master 分支的所有代码是个问题吗?
-
您实际上并没有 master 分支的所有代码?那是新信息。在这种情况下,所有赌注都取消了。