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.

workspace.json problems

See original GitHub issue

Hi,

BUG 1: In the latest version 8 if a new Ionic app is created. Cannot start live reload due to missing angular.json file in app directory(apps/ionic-myapp). It must be created manually with separate configuration.

$ cd apps/ionic-myapp && ionic capacitor run ios --livereload --address=0.0.0.0
> ng run app:serve --host=0.0.0.0 --port=8100
[ng] The run command requires to be run in an Angular project, but a project definition could not be found.

Question 1: Also i would like to know what is purpose of renaming angular.json to workspace.json? Angular console and commands like ng xi18n stoped working because of that.

ng xi18n
The xi18n command requires to be run in an Angular project, but a project definition could not be found.

Question 2 / Bug2: If i rename workspace.json to angular.json, Angular console and commands start to work, but im getting error with xi18n

ERROR in Unexpected value 'McbIonicCoreModule in .../myapp/xplat/ionic/core/core.module.ts' imported by the module 'CoreModule in .../myapp//apps/ionic-myapp/src/app/core/core.module.ts'. Please add a @NgModule annotation.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:16 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
Brandejscommented, Aug 28, 2019

Hi, yes i tried both NX and NG. with NX there is just info that it will forwad to angular CLI.

NX NOTE Nx didn’t recognize the command, forwarding on to the Angular CLI.

I noticed that problem is not related just to xi18n, but it is also impossible to run build command with --prod flag.

Im trying that on new project. Step to reproduce:

$ npx create-xplat-workspace myworkspace
> Angular CLI // this generate angular.json instead of workspace.json
> ionic
> angular
--- ERROR: You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable. Command failed: npx nx g @nstudio/xplat:init
$ ng g @nstudio/xplat:init // With ng it works
> ionic
> angular
$ ng g app // nx g app - didn't work
> ionic
> angular
> Use xplat supp... : Y
$ yarn run prepare.ionic.APP_NAME
$ nx build ionic-APP_NAME // OK
$ nx build ionic-APP_NAME --prod // same error as with xi18n
$ ng version
Angular CLI: 8.0.1
Node: 12.4.0
OS: darwin x64
$ npx  --version
10.2.0

1reaction
NathanWalkercommented, Apr 8, 2020

This will be solved when Nrwl merges this pr

Read more comments on GitHub >

github_iconTop Results From Across the Web

Workspace.json file not found in latest version · Issue #10287
I am following this documentation. workspace.json file not created for both workspace command and npm-package command. So this example not ...
Read more >
User and Workspace Settings - Visual Studio Code
The error can be as simple as a missing comma or incorrect setting value. Open the settings.json file with the Preferences: Open Settings...
Read more >
How to access and edit settings json in vscode - YouTube
How to access and edit settings json in vscode | workspace and user settings. json file. 6.1K views 4 months ago.
Read more >
Workspace json missing - Import and Export
json inside the project directory. If workspaces.json is absent or outdated, the project's import to another cryoSPARC instance will be faulty ...
Read more >
nrwl NX error on generating nest library NX 'project.json' ...
Plz help.. > NX 'project.json' files are incompatible with version 1 workspace schemas. Error: ...
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