我已经制作了一个nodejs API,当我在本地运行它时,它工作正常。但是,当我尝试在Google云服务器上运行它时,在登录请求中引发了一些错误。
Error: secretOrPrivateKey must have a value at Object.module.exports [as sign] (/home/labssimplifii/kiran/ProductCatalogue/productapi/node_modules/jsonwebtoken/sign.js:107:20) at bcrypt.compare (/home/labssimplifii/kiran/ProductCatalogue/productapi/api/routes/user.js:57:23) npm ERR! Linux 4.15.0-1028-gcp npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start" npm ERR! node v6.17.1 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! productapi@1.0.0 start: `node server.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the productapi@1.0.0 start script 'node server.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the productapi package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node server.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs productapi npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls productapi npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /home/labssimplifii/kiran/ProductCatalogue/productapi/npm-debug.log
这是错误消息,并且在本地登录请求运行正常