Update ionic framework from 3.7.0->3.7.1 can't build ios app


#1

Hi, everyone, I am updating the framework from 3.7.0->3.7.1 recently. After that when I run “ionic cordova platform add ios”, it have a following error:

Error: Cannot find module './resources'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at /Users/xxxxxx/Downloads/ionicproj/node_modules/ionic/dist/commands/cordova/index.js:25:167 

Anyone know how to solve it? my ionic info is below:

cli packages: (/Users/xxxxxx/Downloads/ionicproj/node_modules)

@ionic/cli-utils  : 1.15.1
ionic (Ionic CLI) : 3.15.1

global packages:

cordova (Cordova CLI) : 7.1.0 

local packages:

@ionic/app-scripts : 3.0.1
Cordova Platforms  : android 6.2.3 ios 4.5.2
Ionic Framework    : ionic-angular 3.7.1

System:

ios-deploy : 1.9.2 
ios-sim    : 5.0.13 
Node       : v7.10.0
npm        : 5.0.4 
OS         : macOS Sierra
Xcode      : Xcode 9.0.1 Build version 9A1004 

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : legacy

#2

Can you build a newly, with ionic start created project?
Delete your node_modules folder in the project directory and run npm i. Does that fix it?


#3

Hi, @Sujan12. What means? Build a new project, and then del the node_modules and run npm i in existing problem project?


#4

That are two seperate attempts to understand and fix your problem.


#5

@Sujan12 I can build the app with new proj, but the existing project can’t.
the existing project have the below wording when building but new project haven’t, Is it the clue?

Update IOS build setting SWIFT_OBJC_BRIDGING_HEADER to: "$(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h" for build configuration Debug
Update IOS build setting SWIFT_OBJC_BRIDGING_HEADER to: "$(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h" for build configuration Release
Update IOS build setting ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to: YES for build configuration Debug
Update SWIFT version to 3 Debug
Update IOS build setting ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to: YES for build configuration Release
Update SWIFT version to 3 Release

#6

I think you get an error when adding the ios platform, how can you build your project then?


#7

Sorry, what do you means


#8

So you can’t add the platform.

So you can build the project with the added platform.

Which is it?