出于某种原因,我似乎无法让 AWS 开发工具包在 Meteor 0.7.0.1 中工作。如果我使用 npm 安装,我会得到以下信息:
While building the application:
node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/test.html:1: Can't set DOCTYPE here. (Meteor sets <!DOCTYPE html> for you)
node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/LICENSE-W3C.html:1: Can't set DOCTYPE here. (Meteor sets <!DOCTYPE html> for you)
node_modules/aws-sdk/dist/console.html:1: Can't set DOCTYPE here. (Meteor sets <!DOCTYPE html> for you)
node_modules/aws-sdk/dist/s3upload.html:1: Can't set DOCTYPE here. (Meteor sets <!DOCTYPE html> for you)
node_modules/aws-sdk/dist/tests.html:1: Can't set DOCTYPE here. (Meteor sets <!DOCTYPE html> for you)
node_modules/aws-sdk/dist-tools/browser-builder.js:1:15: Unexpected token ILLEGAL
如果我全局安装(-g 标志),我得到:
Error: Cannot find module 'aws-sdk'
我也尝试安装meteor-aws-sdk 和aws-sdk-npm 似乎都不起作用...目前我正在尝试使用该行:
Npm.require( 'aws-sdk' );
导入模块。