nx-plugins
nx-plugins copied to clipboard
[BUG] After creating monorepo blank workspace not able to create api
Describe the bug After creating monorepo blank workspace not able to create serverless lambda app I am getting below error
nx g @flowaccount/nx-serverless:api-serverless --name=myapi --provider=aws
✔ In which directory should the serverless api be generated? · test
✔ Are you using the latest nx version? (Y/n) · true
✔ Which region do you want to default your deployment to? · ap-southeast-1
TypeError: workspace_2.toFileName is not a function
at normalizeOptions (/mnt/c/work/nxpoc/node_modules/@flowaccount/nx-serverless/src/schematics/api/api.js:168:26)
at /mnt/c/work/nxpoc/node_modules/@flowaccount/nx-serverless/src/schematics/api/api.js:181:25
at Generator.next (
To Reproduce Steps to reproduce the behavior:
- I am using WSL ubuntu 20.
- I ran this command below
- npx create-nx-workspace monorepopoc
- npm install @flowaccount/nx-serverless --save-dev
- nx g @flowaccount/nx-serverless:api-serverless --name=myapi --provider=aws
Package.json { "name": "nxpoc", "version": "0.0.0", "license": "MIT", "scripts": { "start": "nx serve", "build": "nx build", "test": "nx test" }, "private": true, "dependencies": {}, "devDependencies": { "@flowaccount/nx-serverless": "^1.1.2", "@nrwl/cli": "13.4.6", "@nrwl/tao": "13.4.6", "@nrwl/workspace": "13.4.6", "@types/node": "16.11.7", "prettier": "^2.3.1", "typescript": "~4.4.3" } }
Expected behavior It should create a serverless lambda folder withhin the apps folder
Screenshots
✔ In which directory should the serverless api be generated? · apps
✔ Are you using the latest nx version? (Y/n) · true
✔ Which region do you want to default your deployment to? · ap-southeast-1
TypeError: workspace_2.toFileName is not a function
at normalizeOptions (/mnt/c/work/nxpoc/node_modules/@flowaccount/nx-serverless/src/schematics/api/api.js:168:26)
at /mnt/c/work/nxpoc/node_modules/@flowaccount/nx-serverless/src/schematics/api/api.js:181:25
at Generator.next (
Hey so this is an incompatible issue with nx 13
We have an issue for it #123
Please follow that. If that is solved this will work! :)
No I am trying just create a new monorepo to explore the new features
No I am trying just create a new monorepo to explore the new features
yes and i am struggling a bit with migrating to 13. :) please be patience