Nativescript-cli: Getting new errors with v5.0

Created on 3 Oct 2018  ยท  8Comments  ยท  Source: NativeScript/nativescript-cli

Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo?

Yes, but it may not have hit yet since this is an issue with a bleeding-edge version.

Background

With the update to Xcode 10 came some problems for the CLI...

Like Issue #3957, for example, which suggested as its solution upgrading to the CLI's next version (npm install -g nativescript@next)

I did that, and while it seems to have resolved that issue as promised, I'm seeing several new errors that are unique to CLI v.5.

Which platform(s) does your issue occur on?

Both

Please provide the following version numbers that your issue occurs with:

  • CLI: before: 4.2.4, after: 5.0.0-2018-10-02-12369
  • Cross-platform modules: 4.2.0
  • Runtime(s): 4.2.0 for both
  • Plugin(s):
"dependencies": {
    "@angular/animations": "~6.1.0",
    "@angular/common": "~6.1.0",
    "@angular/compiler": "~6.1.0",
    "@angular/core": "~6.1.0",
    "@angular/forms": "~6.1.0",
    "@angular/http": "~6.1.0",
    "@angular/platform-browser": "~6.1.0",
    "@angular/platform-browser-dynamic": "~6.1.0",
    "@angular/router": "~6.1.0",
    "@ngrx/store": "^6.1.0",
    "nativescript-admob": "^2.0.0",
    "nativescript-angular": "^6.1.0",
    "nativescript-appversion": "^1.4.1",
    "nativescript-purchase": "^2.0.5",
    "nativescript-sound": "^1.0.4",
    "nativescript-vibrate": "^2.1.1",
    "reflect-metadata": "~0.1.10",
    "rxjs": "^6.0.0",
    "tns-core-modules": "~4.2.0",
    "zone.js": "^0.8.26"
},
"devDependencies": {
    "@angular/compiler-cli": "~6.1.6",
    "@ngtools/webpack": "~6.1.0",
    "@types/jasmine": "^2.8.8",
    "angular-tslint-rules": "^1.5.0",
    "codelyzer": "^4.4.4",
    "jasmine-core": "3.2.1",
    "karma": "3.0.0",
    "karma-jasmine": "1.1.2",
    "karma-mocha-reporter": "^2.2.5",
    "karma-nativescript-launcher": "0.4.0",
    "nativescript-dev-sass": "^1.6.0",
    "nativescript-dev-typescript": "~0.7.0",
    "nativescript-dev-webpack": "~0.15.0",
    "nativescript-tests-hook": "0.0.1",
    "nativescript-unit-test-runner": "^0.3.4",
    "tns-platform-declarations": "^4.2.0",
    "tslint": "^5.11.0",
    "typescript": "~2.7.2",
    "webpack": "^4.17.2"
}

Please tell us how to recreate the issue in as much detail as possible.

After upgrading to v5.0.0-2018-10-02-12369, the following new errors appear:

1) Error while loading nativescript-angular-cli is: Default commands should be required before child commands

A simple tns command like tns --version throws this, as does building, running, ets on all platforms

2) Unable to apply changes for device: XXX... Error is: cp: copyFileSync: could not write to dest file (code=EACCES): ...

Saving a modified file that triggers liveSync throws this error and liveSync fails.

Very excited for the stable 5.0 release. Hoping this feedback can hasten that day, and possibly fix some issues in the current build.

question

Most helpful comment

@skopekreep thank you for reporting this issues. Can you please uninstall the package nativescript-angular-cli globally from your system.

Then restart the terminal and try to ruin the NativeScript CLI commands.

Update: as the package is, in fact, an extension you need to uninstall it as follows:

tns extension uninstall nativescript-angular-cli

All 8 comments

@skopekreep thank you for reporting this issues. Can you please uninstall the package nativescript-angular-cli globally from your system.

Then restart the terminal and try to ruin the NativeScript CLI commands.

Update: as the package is, in fact, an extension you need to uninstall it as follows:

tns extension uninstall nativescript-angular-cli

Confirming that tns extension uninstall nativescript-angular-cli removes errors 1 and 2 above.

Thank you.

Any solution for this as just uninstalling the angular cli doesnt look as solution, is the problem from angular cli that needs to update to 5.0 or 5.0 broke something in their ? Should we open issue in angular cli ? Thanks

Try installing nativescript - this worked for me.

npm install -g nativescript

I think I dind't get it. Uninstalling the extension is the solution? It is not. Is it an nativescript-angular-cli problem? If so I'll open a issue there

This plugin is broken.

java.lang.IllegalArgumentException: Argument for @NotNull parameter 'data' of com/intellij/execution/configuration/EnvironmentVariablesTextFieldWithBrowseButton.setData must not be null
    at com.intellij.execution.configuration.EnvironmentVariablesTextFieldWithBrowseButton.a(EnvironmentVariablesTextFieldWithBrowseButton.java)
    at com.intellij.execution.configuration.EnvironmentVariablesTextFieldWithBrowseButton.setData(EnvironmentVariablesTextFieldWithBrowseButton.java)
    at org.igu.plugins.nativescript.runner.ui.NsRunConfigurationEditor.resetEditorFrom(NsRunConfigurationEditor.java:132)
    at org.igu.plugins.nativescript.runner.ui.NsRunConfigurationEditor.resetEditorFrom(NsRunConfigurationEditor.java:42)
    at com.intellij.openapi.options.SettingsEditor.lambda$resetFrom$0(SettingsEditor.java:86)
    at com.intellij.openapi.options.SettingsEditor.bulkUpdate(SettingsEditor.java:93)
    at com.intellij.openapi.options.SettingsEditor.resetFrom(SettingsEditor.java:86)
    at com.intellij.execution.impl.ConfigurationSettingsEditor$ConfigToSettingsWrapper.resetEditorFrom(ConfigurationSettingsEditor.java:298)
    at com.intellij.execution.impl.ConfigurationSettingsEditor$ConfigToSettingsWrapper.resetEditorFrom(ConfigurationSettingsEditor.java:282)
    at com.intellij.openapi.options.CompositeSettingsEditor.resetEditorFrom(CompositeSettingsEditor.java:51)
    at com.intellij.execution.impl.ConfigurationSettingsEditorWrapper.resetEditorFrom(ConfigurationSettingsEditorWrapper.java:91)
    at com.intellij.execution.impl.ConfigurationSettingsEditorWrapper.resetEditorFrom(ConfigurationSettingsEditorWrapper.java:26)
    at com.intellij.openapi.options.SettingsEditor.lambda$resetFrom$0(SettingsEditor.java:86)
    at com.intellij.openapi.options.SettingsEditor.bulkUpdate(SettingsEditor.java:93)
    at com.intellij.openapi.options.SettingsEditor.resetFrom(SettingsEditor.java:86)
    at com.intellij.openapi.options.SettingsEditorConfigurable.reset(SettingsEditorConfigurable.java:54)
    at com.intellij.execution.impl.RunConfigurable.a(RunConfigurable.kt:324)
    at com.intellij.execution.impl.RunConfigurable.access$showTemplateConfigurable(RunConfigurable.kt:75)
    at com.intellij.execution.impl.RunConfigurable$initTree$3.valueChanged(RunConfigurable.kt:260)
    at javax.swing.JTree.fireValueChanged(JTree.java:2927)
    at javax.swing.JTree$TreeSelectionRedirector.valueChanged(JTree.java:3391)
    at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:635)
    at com.intellij.ui.treeStructure.Tree$MySelectionModel.fireValueChanged(Tree.java:672)
    at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1093)
    at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(DefaultTreeSelectionModel.java:294)
    at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(DefaultTreeSelectionModel.java:188)
    at javax.swing.JTree.setSelectionPath(JTree.java:1634)
    at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(BasicTreeUI.java:2393)
    at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(BasicTreeUI.java:3609)
    at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressedDND(BasicTreeUI.java:3586)
    at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(BasicTreeUI.java:3545)
    at com.intellij.util.ui.MouseEventAdapter.mousePressed(MouseEventAdapter.java:33)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279)
    at java.awt.Component.processMouseEvent(Component.java:6545)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
    at com.intellij.ui.treeStructure.Tree.processMouseEvent(Tree.java:424)
    at java.awt.Component.processEvent(Component.java:6313)
    at java.awt.Container.processEvent(Container.java:2237)
    at java.awt.Component.dispatchEventImpl(Component.java:4903)
    at java.awt.Container.dispatchEventImpl(Container.java:2295)
    at java.awt.Component.dispatchEvent(Component.java:4725)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4523)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
    at java.awt.Container.dispatchEventImpl(Container.java:2281)
    at java.awt.Window.dispatchEventImpl(Window.java:2746)
    at java.awt.Component.dispatchEvent(Component.java:4725)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
    at java.awt.EventQueue.access$500(EventQueue.java:98)
    at java.awt.EventQueue$3.run(EventQueue.java:715)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
    at java.awt.EventQueue$4.run(EventQueue.java:737)
    at java.awt.EventQueue$4.run(EventQueue.java:735)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
    at com.intellij.ide.IdeEventQueue.q(IdeEventQueue.java:781)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:718)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
    at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
    at java.awt.Dialog.show(Dialog.java:1077)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:698)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:430)
    at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1690)
    at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1639)
    at com.intellij.execution.actions.EditRunConfigurationsAction.actionPerformed(EditRunConfigurationsAction.java:47)
    at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:255)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:272)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.a(ActionMenuItem.java:304)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:307)
    at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:106)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:294)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.a(ActionMenuItem.java:114)
    at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:88)
    at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:111)
    at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:120)
    at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:122)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:114)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:308)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
    at com.apple.laf.ScreenMenuItemCheckbox.itemStateChanged(ScreenMenuItemCheckbox.java:193)
    at java.awt.CheckboxMenuItem.processItemEvent(CheckboxMenuItem.java:389)
    at java.awt.CheckboxMenuItem.processEvent(CheckboxMenuItem.java:357)
    at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:355)
    at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:343)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:767)
    at java.awt.EventQueue.access$500(EventQueue.java:98)
    at java.awt.EventQueue$3.run(EventQueue.java:715)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
    at java.awt.EventQueue$4.run(EventQueue.java:737)
    at java.awt.EventQueue$4.run(EventQueue.java:735)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
    at com.intellij.ide.IdeEventQueue.q(IdeEventQueue.java:781)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:722)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

May we please reopen the issue ?

@AhmedAzzabi @DarkSiderOC @allnash See this issue: https://github.com/sebawita/nativescript-angular-cli/issues/11 (was created 14 hours ago)

Which is filed in the correct repository. I'm also having this issue myself and will be watching closely as a fix is made.

Cross-posting this from https://github.com/sebawita/nativescript-angular-cli/issues/11


developer@xxx:~/git//SampleApp$ tns generate
Error while loading nativescript-angular-cli is: Default commands should be required before child commands
The generate command requires a schematic name to be specified.
# tns generate

### Description

Modifies the project by executing a specified schematic to it.

### Commands

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Usage   โ”‚ Synopsis                                                                   โ”‚
โ”‚ General โ”‚ $ tns generate <Schematic Name> [--collection <Collection>] [option=value] โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

### Options

    * --collection - specifies the node package to be used as schematics collection. If it's not specified, @nativescript/schematics will be used.

### Arguments

    * <Schematic Name> - name of the schematic to be executed. The schematic should be specified in the used collection.
    * <option=value> - options for executed schematic.

Maybe the conflict is that the tns CLI has added a command generate and this is conflicting with the generate command added from this nativescript-angular-cli extension? Might explain the error message as well as it refers to calling the default command before a child command, similar to calling super() in a constructor method when extending another class.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NickIliev picture NickIliev  ยท  3Comments

trodellez picture trodellez  ยท  3Comments

kefahB picture kefahB  ยท  3Comments

NickIliev picture NickIliev  ยท  3Comments

donker picture donker  ยท  3Comments