Comments (7)
@wickstargazer Thank you very much! I will test it out and close this issue on success. I'm in active development on this product right now and am finding that deploy is also failing in a Gitlab CI (lambci/) environment so I will make an issue for that, too.
from nx-plugins.
@ajhool this bug is fixed in 0.4.5
the schematics is changed from nx generate @flowaccount/nx-serverless:application
to nx generate @flowaccount/nx-serverless:api-serverless
if you think that does not make sense please recommend.
also if you are using on an existing repo, you have to remove the watch:true
from the build architect.
Basically, that was the bug.
I will close the issue for now, we can re-open if you find something wrong with the fix
from nx-plugins.
As far as I can tell, the nx "exclude" flag is also not working correctly, so the workaround that I am currently using in CI is to use the --projects flag rather than the -all flag and to list every project except for the sls project.
# This "exclude" flag does not seem to actually exclude the sls-api:
nx run-many --target=build --all --parallel --exclude=sls-api
# Skips the sls app
nx run-many --target=build --projects=todo,todo-e2e,api,api-interfaces,todo-batch --parallel
# Deploys the sls app (and any other deploy targets)
nx run-many --target=deploy --all --parallel
from nx-plugins.
This has been fixed in the latest release :)
Its the watch: true
flag that has been defaulted into the build options, for now you can remove it from workspace.json or angular.json
Exciting release is coming up, can deploy angular universal! :D Thank you for showing interest!
Sorry for the late reply ... I will try to be more prompt!
from nx-plugins.
@wickstargazer thanks for the update. Sorry for not getting back to this issue, I have been tracking down some other issues, most of which were AWS permissions + serverless config. However, it would be really helpful to see serverless verbose output in the terminal but I haven't found a way to do that with nx run-many --target=deploy
, any ideas? I can open a new issue for logging if you would like
from nx-plugins.
try export SLS_DEBUG=true
from nx-plugins.
Even with SLS_DEBUG=true, the output of nx run-many --target=deploy --all
fails silently
Serverless: Load command param:get
Serverless: Load command param:list
Hash: dcbfaafc7f35681865e0
Built at: 03/15/2020 3:43:52 PM
Entrypoint src/handler = src/handler.js
chunk {0} src/handler.js (src/handler) 412 bytes [entry] [rendered]
[0] external "tslib" 42 bytes {0} [built]
[1] 1617ms -> factory:3ms building:1ms = 1621ms
[1] ./apps/sls-api-v2/src/handler.ts 370 bytes {0} [built]
factory:1278ms building:339ms = 1617ms
Serverless: getting external modules
Serverless: create a package.json with first level dependencies
Serverless: generate lock entry for yarn for dependency graph to work.
Serverless: get the packagelist with dependency graph and depth=2 level
Serverless: re-writing package.json with dependency-graphs
Serverless: WARNING: Could not determine version of module tslib
Serverless: run packager to install node_modules
Serverless: yarn install v1.21.1
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 0.55s.
Serverless: Invoke deploy
Serverless: Invoke package
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:common:cleanupTempDir
Serverless: Packaging service...
———————————————————————————————————————————————
> NX ERROR Running target "deploy" failed
Failed projects:
- sls-api-v2
You can isolate the above projects by passing: --only-failed
Whereas a native serverless deploy
provides useful information on the failure:
Serverless: Load command param:get
Serverless: Load command param:list
Serverless: Invoke deploy
Serverless: Invoke package
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:common:cleanupTempDir
Serverless: Packaging service...
Serverless Error ---------------------------------------
ServerlessError: Missing "handler" property in function "vpc". Please make sure you point to the correct lambda handler. For example: handler.hello. Please check the docs for more info
I will open a new issue for this one.
from nx-plugins.
Related Issues (20)
- [BUG] Cannot create new api HOT 1
- [BUG] Cannot find module '@nrwl/workspace/src/utilities/run-webpack' HOT 1
- [BUG] Schematic "init" cannot resolve the factory. HOT 3
- [BUG] nx-serverless: Property 'port' does not match the schema. '7777' should be a 'number'. HOT 1
- [BUG] When using npm as packager, pacakgelist is not properly computed resulting in "*" for all package versions HOT 2
- [FEAT] Webpack stats.json support HOT 4
- [BUG] NX 13 and Webpack5 Support HOT 10
- Configuration error at 'useDotenv': should be equal to constant HOT 2
- [BUG] After creating monorepo blank workspace not able to create api HOT 3
- [FEAT] Nx-Serverless | option to exclude ALL dependencies from build HOT 1
- Cannot destructure property 'name' of 'node' as it is undefined. - @flowaccount/scully-plugin-angular-delay
- Support newer Serverless framework
- [BUG] Not able to run or build the freshly scaffolded project HOT 3
- [FEAT] Build functions individually HOT 9
- [BUG] Zip file resolution error when deploying a single artifact HOT 18
- Allow for a serverless.ts file HOT 8
- [BUG] External dependencies are unavailable after deploying HOT 5
- [BUG] Cannot Include Json Schema in serverless.yml HOT 6
- [BUG] Runtime.ImportModuleError in every Lambda function after deploying new project HOT 2
- [BUG] Missing compat.ts for sls executor 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 nx-plugins.