1

出于某种原因,我似乎无法让 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' );

导入模块。

4

1 回答 1

2

您已使用npm. Meteor 不支持以这种方式安装的 npm 模块。您需要使用包装材料,例如npm大气包装。

您可以aws-sdk使用陨石安装。有一个关于大气的最新包:https ://atmosphere.meteor.com/package/aws-sdk

于 2014-01-10T19:00:04.540 回答