- cds run 命令行报错的分析方法
- 使用 SAP Uiveri5 遇到 passport 依赖的问题
- Angular tsconfig.json 文件里的 paths
- To run dex in process, the Gradl
- react-native CFBundleIdentifier
- 运行flutter项目报Error connecting to
- Flutter报错之Waiting for another fl
- GoLand报错:package XXX is not in G
- pod install LibreSSL SSL_connect
- 使用注解 @requires 给 SAP CAP CDS 模型添
我的这篇文章:SAP Cloud Application Programming 介绍(2021 更新版), 有朋友评论:
cds run报错:[ERROR] Cannot find module @sap/cds';,执行命令: npm i -g @sap/cds重装了,还是不行,请问是什么原因?

首先,如果是使用 -g 选项进行全局安装的话,@sap/cds 会安装在 Node.js 文件夹的 node_modules
文件夹下。在我的机器上,例子如下:

所以首先检查自己 Node.js node_modules 文件夹下的资源,是否和我上图的一致。
然后需要检查 Node.js 的环境变量是否成功设置了。如果本机安装了多个版本的 Node.js,使用 where node
,查看当前命令行的 node 命令,到底调用的是哪一个版本的 node.exe:


我上图的例子说明,虽然我机器安装了 12.18.3 和 16.15.0 两个版本的 Node.js,但是命令行里直接敲 node,调用的是后者。

网友评论