Fabio Fabbri created CB-5644:
--------------------------------
Summary: Error: ENOENT, no such file or directory
'PATH/platforms/ios/._PROJECTNAME/config.xml' during "cordova prepare ios"
Key: CB-5644
URL: https://issues.apache.org/jira/browse/CB-5644
Project: Apache Cordova
Issue Type: Bug
Components: CLI, iOS
Affects Versions: 3.2.0
Environment: OS X 10.9, Xcode 5.0.2 Build version 5A3005, Node
v0.10.18, Cordova CLI 3.2.0-0.4.0,
Reporter: Fabio Fabbri
I have run "cordova prepare ios" on a project. After some successful run, after
I opened the Xcode project with Xcode, I executed again "cordova prepare ios"
and I got the following error:
Error: ENOENT, no such file or directory
'PROJECT_PATH/platforms/ios/._APPNAME/config.xml'
at Object.fs.openSync (fs.js:427:18)
at Object.fs.readFileSync (fs.js:284:15)
at Object.module.exports.parseElementtreeSync
(/usr/local/lib/node_modules/cordova/src/xml-helpers.js:111:27)
at Object.config_parser
(/usr/local/lib/node_modules/cordova/src/config_parser.js:25:20)
at Object.ios_parser
(/usr/local/lib/node_modules/cordova/src/metadata/ios_parser.js:62:19)
at /usr/local/lib/node_modules/cordova/src/prepare.js:56:23
at Array.map (native)
at CLI.prepare (/usr/local/lib/node_modules/cordova/src/prepare.js:54:35)
at new CLI (/usr/local/lib/node_modules/cordova/src/cli.js:104:30)
at Object.<anonymous>
(/usr/local/lib/node_modules/cordova/bin/cordova:41:16)
After hours of tentatives and headaches, I found out that Xcode created the
file PROJECT_PATH/platforms/ios/._APPNAME.xcodeproject . I deleted this file
and "cordova prepared ios" was working again.
I didn't investigate further, but I suspect that che CLI script searches for
files in the format "platforms/ios/*.xcodeproject" and for every file found it
assumes there is a folder with the same name excluding the ending
".xcodeproject". I think you should add other conditions there to avoid this
kind of error.
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)