Comments (3)
when I update the node to v6.6 and run again, get error as below:
[email protected]:/data/release/weapp-demo-album-master/server
node -v
v6.6.0
[email protected]:/data/release/weapp-demo-album-master/server
node app.js
module.js:457
throw err;
^
Error: Cannot find module 'cos-nodejs-sdk-v5/sdk/config'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object. (/data/release/weapp-demo-album-master/server/services/cos/index.js:2:20)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
from weapp-demo-album.
did not find 'cos-nodejs-sdk-v5/sdk/config'
[email protected]:/data/release/weapp-demo-album-master/server
ll node_modules/cos-nodejs-sdk-v5/sdk/
total 120K
drwxr-xr-x 2 root 4.0K Jul 25 15:07 .
drwxr-xr-x 6 root 4.0K Jul 25 15:07 ..
-rw-r--r-- 1 root 23K Jun 17 13:59 advance.js
-rw-r--r-- 1 root 70K Jun 24 23:26 base.js
-rw-r--r-- 1 root 418 May 31 22:16 cos.js
-rw-r--r-- 1 root 6.8K Jun 17 13:59 util.js
from weapp-demo-album.
the server can started after the modification
[email protected]:/data/release/weapp-demo-album-master/server
cat services/cos/index.js
const COS = require('cos-nodejs-sdk-v5')
//const _cosConfig = require('cos-nodejs-sdk-v5/sdk/config')
const config = require('../../config')
/**
- init COS config
- see: https://github.com/tencentyun/cos-nodejs-sdk-v5/blob/master/sdk/config.js#L24
*/
//_cosConfig.setAppInfo(config.cosAppId, config.cosSecretId, config.cosSecretKey);
var cos = new COS({
AppId: config.cosAppId,
SecretId: config.cosSecretId,
SecretKey: config.cosSecretKey,
});
module.exports = cos
from weapp-demo-album.
Related Issues (11)
- 关于微信小相册的一些问题,谢谢
- cos.getBucket is not a function
- 接口已经改变,简单写了个python能用的
- 腾讯云CVM镜像在哪里?
- 腾讯云CVM镜像在哪里啊
- 关于wx.saveFile HOT 7
- 小程序能同时上传多张图片吗
- list接口从腾讯cos获取照片列表一直报ERROR_PROXY_AUTH_FAILED HOT 3
- SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
- 我遇到问题就是当我点击相册的时候就会出现这个问题,没有改过什么东西
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 weapp-demo-album.