【发布时间】:2019-06-09 19:54:11
【问题描述】:
正如标题所说,我使用的是 cloudinary 的 NPM 包,我原本以为是配置问题,但这是我第三次遇到这个特定错误,我似乎无法返回任何东西来自 Google。
{ fieldname: 'name-of-input-key',
originalname: 'leaf.png',
encoding: '7bit',
mimetype: 'image/png' }
file uploaded to server
{ fieldname: 'name-of-input-key',
originalname: 'leaf.png',
encoding: '7bit',
mimetype: 'image/png',
destination: 'uploads/',
filename: 'leaf.png',
path: 'uploads/leaf.png',
size: 10227 }
/home/nolan/Node/cloudinary-skel/node_modules/cloudinary/lib/utils/index.js:989
return {...hash1, ...hash2};
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:533:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/nolan/Node/cloudinary-skel/node_modules/cloudinary/lib/cloudinary.js:4:17)
我假设它没有运行 Babel 或其他东西,因为这些参数对 ES6 来说是新的,但我似乎无法弄清楚?提前致谢!
【问题讨论】:
标签: node.js express npm babeljs cloudinary