私はAWSラムダ関数で動作するようcasperjsを取得しようとしています。CasperJSとAWS Lambda
{
"errorMessage": "Cannot find module 'casper'",
"errorType": "Error",
"stackTrace": [
"Function.Module._load (module.js:276:25)",
"Module.require (module.js:353:17)",
"require (internal/module.js:12:17)",
"Object.<anonymous> (/var/task/index.js:3:14)",
"Module._compile (module.js:409:26)",
"Object.Module._extensions..js (module.js:416:10)",
"Module.load (module.js:343:32)",
"Function.Module._load (module.js:300:12)",
"Module.require (module.js:353:17)"
]
}
私は、ラムダがcasperjsを検出することはできません。このエラーを取得しておきます。私はLambdaに自分のzipファイルをアップロードし、ファイルを圧縮する前にcasperjsモジュールを私のディレクトリにインストールしました。
私のpackage.jsonファイルにはcasperjsがインストールされているというメッセージがあります。
{
"name": "lambda",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"casperjs": "^1.1.3",
}
}
私が間違っていることは誰にも分かりますか?ありがとう。
これは素晴らしいですが、私は1.9.8にphantomjsを固定しなければなりませんでした - 最近のバージョンはLambdaで失敗するでしょう。 – awendt