SAP Fiori Freestyle App开发 本地环境安装与使用

本文档详细介绍了如何在Windows环境下安装和配置Visual Studio Code、Node.js以及npm。首先,下载并安装VSCode和Node.js,然后设置npm全局模块路径和缓存路径,并切换到淘宝npm镜像。接着,通过npm安装express-g和cnpm。遇到gyp错误时,需安装windows-build-tools。最后,介绍了在VSCode中新建SAP项目和运行项目的步骤,包括安装SAP插件、使用应用生成器和运行npm命令。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.下载并安装 Visual Studio Code

2.安装node

参考win10下安装npm&cnpm步骤 - dalyday - 博客园

  :    下载 | Node.js 中文网

2.1分别输入node -v,npm -v检查是否完成

2.2配置npm的全局模块的存放路径以及cache的路径(替换成自己的路径)

npm config set prefix "F:\cache\nodeCache\global"
npm config set cache "F:\cache\nodeCache\cache"

2.3##设置淘宝镜像

##npm config set registry http://registry.cnpmjs.org

2.4安装模块测试

npm install express -g

2.5##通过npman下载安装cnpm

##npm install -g cnpm -registry=https://registry.npm.taobao.org

2.6输入cnpm -v,不是内部命令的话,新增node_global的path环境配置

F:\cache\nodeCache\global

2.7.输入cnpm -v,成功后会显示版本信息 

2.8:报错(参考:首次使用electron-vue踩过的坑_lianlin21212411的博客-CSDN博客)

msvs_version was set from command line or npm config

gyp ERR! find VS
gyp ERR! find VS msvs_version was set from command line or npm config
gyp ERR! find VS - looking for Visual Studio version 2019
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - found in "C:\Program Files (x86)\Microsoft Visual Studio 14.0"
gyp ERR! find VS - could not find MSBuild in registry for this version
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS valid versions for msvs_version:
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************

我使用的是VS Code 1.62.0,难道要换成最新版的Visual Studio?从网上查询得知需要安装windows-build-tools,需要注意的是,必须是以管理员身份来进行安装,因此在打开cmd时要以管理员身份打开。

npm install --g --production windows-build-tools

3.sap新建项目(参考掘金)

3.1添加sap插件:

扩展-->

3.2新建项目:F1-->open application generator

3.3运行

第一次运行前,进入项目目录,npm install

运行命令:npm start

4.SAP apis

SAPUI5 SDK - Demo Kit

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值