Giter Club home page Giter Club logo

Comments (3)

scottwansz avatar scottwansz commented on August 19, 2024

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.

scottwansz avatar scottwansz commented on August 19, 2024

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.

scottwansz avatar scottwansz commented on August 19, 2024

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')

/**

var cos = new COS({
AppId: config.cosAppId,
SecretId: config.cosSecretId,
SecretKey: config.cosSecretKey,
});

module.exports = cos

from weapp-demo-album.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.