question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ionic 2 RC2 Polyfill.js Argument not optional on Windows 10 mobile

See original GitHub issue

Updated to the latest RC2, but I now get errors when deploying to the emulator/device.

Here’s what I’ve tried

  1. ionic start test --v2
  2. ionic platform add windows
  3. npm run build --dev
  4. Open up CordovaApp.sln
  5. Set the device to mobile emulator and deploy image

And this is the error that happens in the Polyfill.js file Exception about Argument not optional

image

Here’s what the package.json file has, but it’s a vanilla project soo…

{
  "name": "ionic-hello-world",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "build": "ionic-app-scripts build",
    "watch": "ionic-app-scripts watch",
    "serve:before": "watch",
    "emulate:before": "build",
    "deploy:before": "build",
    "build:before": "build",
    "run:before": "build"
  },
  "dependencies": {
    "@angular/common": "2.1.1",
    "@angular/compiler": "2.1.1",
    "@angular/compiler-cli": "2.1.1",
    "@angular/core": "2.1.1",
    "@angular/forms": "2.1.1",
    "@angular/http": "2.1.1",
    "@angular/platform-browser": "2.1.1",
    "@angular/platform-browser-dynamic": "2.1.1",
    "@angular/platform-server": "2.1.1",
    "@ionic/storage": "1.1.6",
    "ionic-angular": "2.0.0-rc.2",
    "ionic-native": "2.2.3",
    "ionicons": "3.0.0",
    "rxjs": "5.0.0-beta.12",
    "zone.js": "0.6.21"
  },
  "devDependencies": {
    "@ionic/app-scripts": "0.0.39",
    "typescript": "2.0.6"
  },
  "description": "test: An Ionic project",
  "cordovaPlugins": [
    "cordova-plugin-device",
    "cordova-plugin-console",
    "cordova-plugin-whitelist",
    "cordova-plugin-splashscreen",
    "cordova-plugin-statusbar",
    "ionic-plugin-keyboard"
  ],
  "cordovaPlatforms": []
}

I’ve even stripped out everything to this, and it still get the error.

<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
</head>
<body class="platform-windows platform-cordova platform-webview">
  <script src="build/polyfills.js"></script>
</body>
</html>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:43 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
jgw96commented, Nov 28, 2016

@mtycholaz sorry, mis-spoke on that. So with the latest nightly release we are now running on 2.2.1. To update to that nightly you can change your package.json to look like this.

2reactions
jgw96commented, Nov 18, 2016

Hello everyone! We have updated to the latest Angular as of this morning (which means it will be in the next release) which includes a fix for this issue. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ionic 2 RC2 Polyfill.js Argument not optional on Windows 10 ...
Through this the polyfills problems of this issue doesn't seems to appear & I have system.out.println and stack traces on the cmd. Without...
Read more >
Build a Windows 10 App with Ionic 2 RC
Issue: Ionic 2 RC2 Polyfill.js Argument not optional on Windows 10 ... the intention of hosting it on a website, instead of as...
Read more >
Argument not optional - Visual Basic - Microsoft Learn
An argument can only be omitted from a call to a user-defined procedure if it was declared Optional in the procedure definition. To...
Read more >
Getting error as ERROR TypeError: Argument not optional in ...
This is absolutely not how you are supposed to use Angular. getElementById ? classList.remove ? Why include the Angular library and then not...
Read more >
AngularJS: Developer Guide: Migrating from Previous Versions
Minor version releases in AngularJS introduce several breaking changes that may require changes to your application's source code; for instance from 1.0 to ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found