“299742-nowjedi-hello”不是有效的自定义元素名称
"299742-nowjedi-hello" is not a valid Custom Element name
我在组件开发和打印简单的 hello world 方面还很陌生。有人能帮我吗?
重现步骤:
1. now-cli login --host stack.service-now.com
2. now-cli project --name nowjedi-hello -- description 'A web component printing Hello World'
3. npm install
4. now-cli develop --open
Returns:
SyntaxError: Failed to execute 'define' on 'CustomElementRegistry': "299742-nowjedi-hello" is not a valid custom element name
我正在关注 "Developing your component"。知道发生了什么吗?
https://developer.servicenow.com/dev.do#!/guide/orlando/now-experience/cli/development-flow/.
名字不能以数字开头
来源:https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
简短摘要:
start 具有 ASCII 较低的 alpha,因此 HTML 解析器会将它们视为标签而不是文本。
不包含任何 ASCII 大写字母。
包含(至少)一个连字符,用于命名空间并确保向前兼容。
允许使用多种名称,以便为以下用例提供最大的灵活性:
<math-α> or <emotion->
我在组件开发和打印简单的 hello world 方面还很陌生。有人能帮我吗?
重现步骤:
1. now-cli login --host stack.service-now.com
2. now-cli project --name nowjedi-hello -- description 'A web component printing Hello World'
3. npm install
4. now-cli develop --open
Returns:
SyntaxError: Failed to execute 'define' on 'CustomElementRegistry': "299742-nowjedi-hello" is not a valid custom element name
我正在关注 "Developing your component"。知道发生了什么吗? https://developer.servicenow.com/dev.do#!/guide/orlando/now-experience/cli/development-flow/.
名字不能以数字开头
来源:https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
简短摘要:
start 具有 ASCII 较低的 alpha,因此 HTML 解析器会将它们视为标签而不是文本。
不包含任何 ASCII 大写字母。
包含(至少)一个连字符,用于命名空间并确保向前兼容。
允许使用多种名称,以便为以下用例提供最大的灵活性:
<math-α> or <emotion->