terraform-cdk: cdktf init fails at npm install (NODE_ENV is not recognized)
Community Note
- Please vote on this issue by adding a π reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave β+1β or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
cdktf & Language Versions
0.0.11 and the typescript template
Debug Output
Figure itβs short enough to be here (just few lines):
$ cdktf init --template="typescript" --local
Note: By supplying '--local' option you have chosen local storage mode for storing the state of your stack.
This means that your Terraform state file will be stored locally on disk in a file 'terraform.tfstate' in the root of your project.
We will now setup the project. Please enter the details for your project.
If you want to exit, press ^C.
Project Name: (default: 'tfcdk')
Project Description: (default: 'A simple getting started project for cdktf.')
'NODE_ENV' is not recognized as an internal or external command,
operable program or batch file.
<cut command line options for cdktf displayed>
Error: Command failed: NODE_ENV=development npm install cdktf@^0.0.11 constructs@^3.0.0
at checkExecSyncError (child_process.js:630:11)
at execSync (child_process.js:666:15)
at installDeps (path\to\npm\node_modules\cdktf-cli\templates\typescript\.hooks.sscaff.js:30:3)
Expected Behavior
No error when doing an init
Actual Behavior
Init fails at the npm install step
Steps to Reproduce
npm i cdktf -g
cdktf init --template="typescript" --local
Important Factoids
Running on Windows 10, Node 12.16.0
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 18 (13 by maintainers)
Just tested now, it works.
Could you give
cdktf-cli@nexta shot? (npm install -g cdktf-cli@next) It should fix the init issues on WindowsNext problem is yarn, which I donβt have, is it mandatory or it should init without yarn?
Error: