Comments (5)
建议到官网控制台提工单给云函数产品咨询下,在SDK这里提问可能无法解决问题。
from tencentcloud-sdk-nodejs.
经过多次测试发现,在云函数下,不能通过layer层调用该sdk 否则会报错
from tencentcloud-sdk-nodejs.
云函数中有这个sdk的内置版本,优先级比layer高,如果放到layer里面要用绝对路径引用,否则会引用到内置的较低版本
from tencentcloud-sdk-nodejs.
请问如何强制引用,有相关文档吗?多谢解答
多说一句
不是应该让 layer 级别比内置级别高才合理吗,我都用 layer 了,还在乎函数内置版本嘛?
而且本地环境运行的版本可能会和内置的不一样,那么就会出现我这种,本地跑没问题,一上线就GG
仅个人观点。
from tencentcloud-sdk-nodejs.
https://main.qcloudimg.com/raw/document/product/pdf/583_19677_cn.pdf
文档里面有说明:
如果在层中使用 SDK,请在代码中指定绝对路径,即 /opt/node_modules/tencentcloud-sdk-nodejs 。
其实按需安装包会更好,既避免了这个问题,也能减少体积
npm install tencentcloud-sdk-nodejs-ses
from tencentcloud-sdk-nodejs.
Related Issues (20)
- TDMQ没有ReceiveCmqMsg HOT 1
- 这里网络请求有bug
- 在vite项目中引入tencentcloud-sdk-nodejs,get-stream 这个包const { promisify } = require('util')提示undefined HOT 1
- Missing "ImageConfig" and "DeployMode" fields in GetFunctionResponse if it is image mode
- tencentcloud-sdk-nodejs-trtc Bug, 当开始云端混流StartMCUMixTranscode()参数"EncodeParams"下的"VideoFramerate"或"VideoBitrate"超出范围时,混流返回结果不会报错 HOT 1
- Any plans on including AbortSignal? HOT 2
- 文档无法使用
- 基于3.0版本创建d.ts文件报错
- tts使用官方nodejs api调试报错 HOT 1
- 没有发消息接口? HOT 2
- abstract_client.ts 中的改动导致 HTTP 请求头中包含非法的 token HOT 1
- uniapp项目引入tencentcloud-sdk-nodejs报错:TypeError: promisify is not a function HOT 6
- 这文档写的真是垃圾啊,跟阿里云相差100000倍 HOT 2
- DescribeCaptchaResult 报错没传SecretId HOT 2
- 请问cos对应哪个目录 HOT 3
- Could not resolve "json-bigint" HOT 2
- services模块可以支持上cos吗?
- 腾讯云函数不支持ESM, `Error [ERR_REQUIRE_ESM]: require() of ES Module /var/user/index.js from /var/runtime/node18/UserFunction.js not supported.`
- Please add 'exports' option to 'pacakge.json' to support modular approach of ESM
- SDK 4.0.842 version build is error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tencentcloud-sdk-nodejs.