Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sapui5 如何使用ui5 cli以URL“启动我的ui5项目”;本地主机:8080/#”;没有",;index.html“;?_Sapui5_Ui5 Tooling - Fatal编程技术网

Sapui5 如何使用ui5 cli以URL“启动我的ui5项目”;本地主机:8080/#”;没有",;index.html“;?

Sapui5 如何使用ui5 cli以URL“启动我的ui5项目”;本地主机:8080/#”;没有",;index.html“;?,sapui5,ui5-tooling,Sapui5,Ui5 Tooling,我按照文档创建了我的第一个SAPUI5/OpenUI5项目。我使用和NPM来管理我的项目 每次我想运行我的项目时,我都会键入命令ui5serve-oindex.html来启动服务。在我的浏览器中,我必须访问localhost:8080/index.html才能获得项目视图 但如果我只是键入localhost:8080/,它就无法自动找到index.html。那么如何解决这个问题呢 这是我的包.json: { "name": "appname", "version": "1.0.0",

我按照文档创建了我的第一个SAPUI5/OpenUI5项目。我使用和NPM来管理我的项目

每次我想运行我的项目时,我都会键入命令
ui5serve-oindex.html
来启动服务。在我的浏览器中,我必须访问
localhost:8080/index.html
才能获得项目视图

但如果我只是键入
localhost:8080/
,它就无法自动找到
index.html
。那么如何解决这个问题呢

这是我的
包.json

{
  "name": "appname",
  "version": "1.0.0",
  "description": "app description",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "dev": "ui5 serve -o index.html",
    "build": "ui5 build --all"
  },
  "keywords": [
    "keyword"
  ],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@openui5/sap.m": "^1.64.0",
    "@openui5/sap.ui.core": "^1.64.0",
    "@openui5/sap.ui.layout": "^1.64.0",
    "@openui5/sap.ui.unified": "^1.64.0",
    "@openui5/themelib_sap_belize": "^1.64.0"
  }
}
以下是通过
ui5 init
命令生成的简单
ui5.yaml
generate:

specVersion: '1.0'
metadata:
  name: appname
type: application
那么,如何在浏览器中访问
localhost:8080
,它就可以进入我的项目