Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: 'Data path "" must NOT have additional properties(styleext)' when creating a new project #20945

Closed
2 of 15 tasks
musabhusaini opened this issue May 25, 2021 · 5 comments
Closed
2 of 15 tasks
Assignees
Labels
needs: more info Reporter must clarify the issue

Comments

@musabhusaini
Copy link

musabhusaini commented May 25, 2021

🐞 Bug report

Command

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes, the previous version in which this bug was not present was: 11.2.13

Description

When trying to create a new project with the CLI, an error is generated.

🔬 Minimal Reproduction

Create a new project using the CLI:


$ ng new my-project
? Would you like to add Angular routing? No
? Which stylesheet format would you like to use? CSS

🔥 Exception or Error



Schematic input does not validate against the Schema: {"styleext":"scss","name":"app","selector":"app-root","flat":true,"path":"/src/app","skipImport":true,"project":"my-project","skipTests":false,"style":"css"}
Errors:

  Data path "" must NOT have additional properties(styleext).

🌍 Your Environment



$ ng version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 12.0.1
Node: 14.17.0
Package Manager: npm 6.14.13
OS: linux x64

Angular: 12.0.1
... animations, cli, common, compiler, compiler-cli, core, forms
... google-maps, platform-browser, platform-browser-dynamic
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1200.1
@angular-devkit/build-angular   12.0.1
@angular-devkit/core            12.0.1
@angular-devkit/schematics      12.0.1
@schematics/angular             12.0.1
rxjs                            6.6.7
typescript                      4.2.4

Anything else relevant?

I am running WSL. The same issue is not encountered on an Ubuntu machine. I managed to create a project on Ubuntu and then copied it to WSL, but ng generate runs into the same error.

@alan-agius4
Copy link
Collaborator

Likely this is caused because you have styleext configured In your global configuration.

You can check the global configuration by running

ng config -g

@alan-agius4 alan-agius4 added the needs: more info Reporter must clarify the issue label May 25, 2021
@alan-agius4 alan-agius4 self-assigned this May 25, 2021
@musabhusaini
Copy link
Author

That was it. Clearing it fixed the issue. Thanks!

@musabhusaini
Copy link
Author

This is a breaking change from previous version. Is it documented somewhere?

@alan-agius4
Copy link
Collaborator

The option has been removed in version 9 https://github.com/angular/angular-cli/releases/tag/v9.0.0 and a migration was included to remove this properly.

In version 12, we fix an issue where previously additional properties invalid can be present in the configuration file.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: more info Reporter must clarify the issue
Projects
None yet
Development

No branches or pull requests

2 participants