when i try to build the ios release version using ionic 1 frame work, below exception am getting, please help me to solve this issuse
const word = '[a-fA-F\\d:]';
SyntaxError: C:\Users\***\AppData\Roaming\npm\node_modules\vs-
tac\node_modules\cordova\6.2.0\node_modules\cordova\node_modules\cordova-
lib\node_modules\request\node_modules\tough-cookie\node_modules\ip-
regex\index.js:3
Use of const in strict mode.
^^^^^^^^^^^^^^
System information:
Ionic:
ionic (Ionic CLI) : 4.9.0
Ionic Framework : ionic1 1.3.1
#ionic/v1-toolkit : not installed
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib#8.1.1)
System:
NodeJS : v10.14.1
npm : 6.4.1
OS : Windows 7
As far as I know Ionic 1 uses Angular 1 which uses ES5, and const is part of ES6.
Related
I've been trying to run in xcode a project with this specifications
The problem I can see in the console of Safari is that the javascript files are not loaded.
I generate the XCode project by
ionic capacitor add ios
Ionic: Ionic CLI : 6.18.2 (C:\NVM\v12.20.0\node_modules\#ionic\cli)
Ionic Framework : ionic-angular 3.9.2
#ionic/app-scripts : 3.2.4 Capacitor: Capacitor CLI : 3.4.3 #capacitor/android : 3.4.3
#capacitor/core : 3.4.3
#capacitor/ios : 3.4.3
Cordova:
Cordova CLI : 11.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview
Utility:
cordova-res : 0.15.4
native-run : 1.5.0
System: NodeJS : v12.20.0 (C:\Program Files\nodejs\node.exe)
npm : 6.14.8
OS : Windows 10
When I run the command ionic cordova build ios I am getting the below error:
Running app-scripts build: --platform ios --target cordova
[12:54:28] build dev started ...
[12:54:29] clean started ...
[12:54:29] clean finished in 7 ms
[12:54:29] copy started ...
Config file "/Users/<user_name>/Documents/Working Folder/<project_name>/config/copy.config.js" not found. Using defaults instead.
[12:54:30] deeplinks started ...
[12:54:33] deeplinks finished in 3.10 s
[12:54:33] transpile started ...
[12:54:52] typescript: node_modules/ng2-pdf-viewer/src/app/pdf-viewer/pdf-viewer.component.d.ts, line: 41
Type 'CustomEvent' is not generic.
L40: onError: EventEmitter<any>;
L41: onProgress: EventEmitter<PDFProgressData>;
L42: pageChange: EventEmitter<number>;
[12:54:52] typescript: node_modules/ng2-pdf-viewer/src/app/pdf-viewer/pdf-viewer.component.d.ts, line: 42
Type 'CustomEvent' is not generic.
L41: onProgress: EventEmitter<PDFProgressData>;
L42: pageChange: EventEmitter<number>;
L43: src: string | Uint8Array | PDFSource;
Error: Failed to transpile program
at new BuildError (/Users/<user_name>/Documents/Working Folder/<project_name>/node_modules/#ionic/app-scripts/dist/util/errors.js:16:28)
at /Users/<user_name>/Documents/Working Folder/<project_name>/node_modules/#ionic/app-scripts/dist/transpile.js:159:20
at new Promise (<anonymous>)
at transpileWorker (/Users/<user_name>/Documents/Working Folder/<project_name>/node_modules/#ionic/app-scripts/dist/transpile.js:107:12)
at Object.transpile (/Users/<user_name>/Documents/Working Folder/<project_name>/node_modules/#ionic/app-scripts/dist/transpile.js:64:12)
at /Users/<user_name>/Documents/Working Folder/<project_name>/node_modules/#ionic/app-scripts/dist/build.js:109:82
[12:54:52] copy finished in 23.56 s
Before building, I had
Removed node_modules, added again with npm i.
Removed and added ios platform using ionic cordova platform remove ios and ionic cordova platform add ios.
Upgraded cordova-ios from 4.4 to 5.1.0
My ionic info:
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
#ionic/app-scripts : 3.1.9
Cordova Platforms : ios 5.1.0
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 1.9.2
ios-sim : 8.0.2
Node : v10.0.0
npm : 5.6.0
OS : macOS
Xcode : Xcode 13.1 Build version 13A1030d
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
I'm developing a Hybrid app using ionic 3 but when I build the app in IOS I'm getting below error.
Error
at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:169:7)
[ERROR] An error occurred while running Cordova build iOS (exit code 1).
My ionic environment info
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.1.2 (cordova-lib#8.1.1)
local packages:
#ionic/app-scripts : 3.2.1
Cordova Platforms : ios 4.5.5
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 1.9.4
Node : v8.1.4
npm : 5.0.3
OS : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
When i run "ionic cordova build ios" get error below in terminal:
The following build commands failed:
Ld build/emulator/Posify\ Kitchen.app/Posify\ Kitchen normal x86_64
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/YJD/Mayun_POS/posify-pos-fb-united/platforms/ios/cordova/build-debug.xcconfig,-workspace,Posify Kitchen.xcworkspace,-scheme,Posify Kitchen,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone X,build,CONFIGURATION_BUILD_DIR=/Users/YJD/Mayun_POS/posify-pos-fb-united/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/YJD/Mayun_POS/posify-pos-fb-united/platforms/ios/build/sharedpch
ionic info:
cli packages: (/Users/YJD/Mayun_POS/posify-pos-fb-united/node_modules)
#ionic/cli-utils : 1.17.0
ionic (Ionic CLI) : 3.17.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
#ionic/app-scripts : 1.3.7
Cordova Platforms : android 6.3.0 ios 4.5.3
Ionic Framework : ionic-angular 3.8.0
System:
ios-deploy : 1.9.2
Node : v6.11.5
npm : 5.5.1
OS : macOS Sierra
Xcode : Xcode 9.0.1 Build version 9A1004
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
I figured it out myself. All of errors seem like "Error: Error code 65 for command: xcodebuild......" are because of certification or Provision profile.I applied the newest provision profile and it fixed.
When i am trying to create IOS build getting error like below.
Error: Metadata version mismatch for module /Users/newuser/WebstormProjects/myproject/node_modules/#ionic-native/network/index.d.ts, found version 4, expected 3
at StaticSymbolResolver.getModuleMetadata (/Users/newuser/myproject/node_modules/#angular/compiler/bundles/compiler.umd.js:24474:34)
at StaticSymbolResolver._createSymbolsOf (/Users/newuser/myproject/node_modules/#angular/compiler/bundles/compiler.umd.js:24260:46)
at StaticSymbolResolver.getSymbolsOf (/Users/newuser/myproject/node_modules/#angular/compiler/bundles/compiler.umd.js:24241:14)
at /Users/newuser/myproject/node_modules/#angular/compiler/bundles/compiler.umd.js:23023:30
at Array.forEach (native)
at extractProgramSymbols (/Users/newuser/myproject/node_modules/#angular/compiler/bundles/compiler.umd.js:23022:79)
at AotCompiler.compileAll (/Users/newuser/myproject/node_modules/#angular/compiler/bundles/compiler.umd.js:22720:47)
at CodeGenerator.codegen (/Users/newuser/myproject/node_modules/#angular/compiler-cli/src/codegen.js:30:14)
at Function.NgTools_InternalApi_NG_2.codeGen (/Users/newuser/myproject/node_modules/#angular/compiler-cli/src/ngtools_api.js:61:30)
at Object.doCodegen (/Users/newuser/myproject/node_modules/#ionic/app-scripts/dist/aot/codegen.js:6:51)
cli packages:
#ionic/cli-utils : 1.16.0
ionic (Ionic CLI) : 3.16.0
global packages:
cordova (Cordova CLI) : 7.0.1
local packages:
#ionic/app-scripts : 2.1.3
Cordova Platforms : android 6.3.0 browser 4.1.0 ios 4.4.0
Ionic Framework : ionic-angular 3.6.0
System:
Node : v6.11.1
npm : 3.10.10
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : legacy