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.

Avoid creating component with unicode naming, instead of throwing error after finishing creation.

See original GitHub issue

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

Angular CLI: 1.5.0 Node: 8.7.0 OS: darwin x64

Repro steps.

Using unicode naming when creating component succeeds:

$ ng generate component 英雄
  create src/app/英雄/英雄.component.css (0 bytes)
  create src/app/英雄/英雄.component.html (25 bytes)
  create src/app/英雄/英雄.component.spec.ts (628 bytes)
  create src/app/英雄/英雄.component.ts (310 bytes)
  update src/app/app.module.ts (398 bytes)

But it results in error.

The log given by the failure.

As @clydin kindly pointed out below, error below is the same as https://github.com/angular/angular-cli/issues/8386, thus most likely not related with the unicode naming.

英雄.component.ts:7 Uncaught ReferenceError: ViewEncapsulation is not defined
    at eval (英雄.component.ts:7)
    at eval (英雄.component.ts:18)
    at Object.../../../../../src/app/英雄/英雄.component.ts (main.bundle.js:58)
    at __webpack_require__ (inline.bundle.js:55)
    at eval (app.module.ts:5)
    at Object.../../../../../src/app/app.module.ts (main.bundle.js:36)
    at __webpack_require__ (inline.bundle.js:55)
    at eval (main.ts:4)
    at Object.../../../../../src/main.ts (main.bundle.js:74)
    at __webpack_require__ (inline.bundle.js:55)

Desired functionality.

Error out when creating component in such way, similar as creating a project with unicode naming:

$ ng new 英雄榜
Project name "英雄榜" is not valid. New project names must start with a letter, and must contain only alphanumeric characters or dashes. When adding a dash the segment after the dash must also start with a letter.
英雄榜
^

Mention any other details that might be useful.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
clydincommented, Nov 8, 2017

The error shown above is a known issue (https://github.com/angular/angular-cli/issues/8386) and is not related to unicode filenames.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 7, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create React App not working - Stack Overflow
In my case, "create-react-app" was not installed. to install run this command npm install -g create-react-app. Once installation successful ...
Read more >
Troubleshoot designer component errors - Azure Machine ...
Resolution: Revisit the component throwing this exception and validate that the column name or names are correct and that all referenced ...
Read more >
Google TypeScript Style Guide
This guide is based on the internal Google TypeScript style guide, but it has been ... Avoid comments that just restate the parameter...
Read more >
Error Explanations for The W3C Markup Validation Service
An entity reference was found in the document, but there is no reference by that name defined. Often this is caused by misspelling...
Read more >
Known issues in After Effects - Adobe Support
"After Effects error: Cinema 4D: Render Failed" while previewing compositions with Cineware effect. Workaround: If you get any of these errors, ...
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