Comments (8)
Thanks, yes, the promise js file is missing. I will add, and let you know the outcome.
from translation-server.
The previous deploy script copies over submodules into a new dir named package. It seems possible that your submodules weren't pulled in locally before deploying! Try running git submodule update --init --recursive
before running locally and deploying.
See line 18 which copies the modules dir (containing multiple git submodules):
translation-server/lambda_deploy
Lines 16 to 20 in e0e31ec
from translation-server.
Thank you SevanBadal. I will follow your directions and I will let you know the outcome
from translation-server.
The modules were copied and the problem still persists. My lambda deploy file is shown below:
#!/bin/bash -e
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -z $1 ]; then
echo "Usage: $0 config.env" >&2
exit 1
fi
set -a
. "$dir/$1"
set +a
rm -rf package
mkdir package
# Skip files that aren't required i.e. ".git"
cp -r config package/
cp -r modules package/
cp -r node_modules package/
cp -r src package/
# Remove broken symlinks because "sam package" complains
find -L package/ -maxdepth 10 -type l -delete
j2 "$dir/lambda_template.yaml.j2" > "$dir/package/template.yaml"
sam package --template-file "$dir/package/template.yaml" --s3-bucket $deployment_bucket_name --output-template-file "$dir/package/package.yaml"
aws cloudformation deploy --template-file "$dir/package/package.yaml" --stack-name $stack_name --capabilities CAPABILITY_IAM
from translation-server.
Can you please paste the result of ls modules/translate
here? We want to confirm that the translate directory is not empty.
from translation-server.
swilliams@LAPTOP-I0QMUR48:~/translation-lambda/translation-server$ ls modules/translate
src
swilliams@LAPTOP-I0QMUR48:~/translation-lambda/translation-server$ ls src
args.js formats.js proxy.js textSearch.js webEndpoint.js
cors.js http.js searchEndpoint.js translation webSession.js
debug.js importEndpoint.js server.js translators.js zotero.js
exportEndpoint.js lambda.js testEndpoint.js utilities.js
from translation-server.
I'm not seeing promise.js in the contents of your modules/translate/src
directory! This could be related to the error message you reported above which is complaining about not finding a module /var/task/modules/translate/src/promise
:
I deployed the zotero translation-server on AWS lambda using your previously deleted lambda_deploy script. Every time I make a request via the API Gateway url the translation-server fails with a "Missing authentication token" The error logs show:
Lambda execution failed with status 200 due to customer function error: Error: Cannot find module '/var/task/modules/translate/src/promise' Method completed with status: 502
from translation-server.
I am tryng to redeploy, by using the updated repository. but I am stuck at ./lambda_deploy: line 15: j2: command not found
The jinjacli is installed jinja2 in ./env/lib/python3.8/site-packages (3.1.2)
. Prior to using the updated code, I deployed with the promise module, but the same error occurred, because the function was looking in /var/task/modules/translate/src/promise for the promise module, but the promise.js file was in my home folder/translation-server/modules/translate/src/promise*. I am thinking of creating a symbolic link. I am unsure if that will work, since I am still stuck at j2 command not found. Any thoughts about the J2 command?
from translation-server.
Related Issues (20)
- translation-server should exclude css/html/js from metadata - site is returning js and css in author field. HOT 1
- Get PDF URL from PubMed? HOT 2
- Building new translators issue: "ReferenceError: filename is not defined" HOT 3
- Exposing used translator(s)
- Add 10 to CI? HOT 1
- Failing on Unicode in URLs HOT 1
- worldcat blocking? HOT 1
- worldcat failures HOT 2
- Internal server error for a NYTimes URL HOT 10
- How to use text search HOT 2
- Node.js 10 End of life HOT 1
- `SyntaxError: Unexpected token .` in utilities submodule HOT 3
- npm WARN tar ENOENT: no such file or directory
- Error: Cannot find module 'w3c-xmlserializer/lib/XMLSerializer' HOT 1
- Proposal: Rename `default.json` to `default.json5` HOT 1
- Web query returning multiple results with single=1 on some websites HOT 2
- Question: How is the key hash generated? HOT 2
- installation failure HOT 1
- ReferenceError: requestText is not defined HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from translation-server.