humanmade / cf-to-tf

CLI tool for generating Terraform configuration and state for existing CloudFormation resources
Other
416 stars 70 forks source link

node --harmony #3

Closed ghost closed 5 years ago

ghost commented 6 years ago

$ cf-to-tf -h module.js:549 throw err;

Error: Cannot find module '/home/juan/node --harmony' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Function.Module.runMain (module.js:693:10) at startup (bootstrap_node.js:188:16) at bootstrap_node.js:609:3

Please help, thanks.

Manuscrit commented 6 years ago

Similar problem here : (UNIX on Windows 10)

cf-to-tf --stack dpm-ansible-dev config

/usr/bin/env: «node --harmony»: Aucun fichier ou dossier de ce type

neoshadybeat commented 6 years ago

same as above

david1983 commented 5 years ago

same

iAmAska commented 5 years ago

I had a similar issue and fixed it by changing

#!/usr/bin/env node --harmony

to

#!/usr/bin/env node

in index.js

nathanielks commented 5 years ago

SO sorry for the silence here, folks! My email client was super buggy when this was filed and I never received a notification. This has been resolved by @zackse in https://github.com/humanmade/cf-to-tf/pull/6

marcodatola commented 5 years ago

Hi, after removing --harmony from ../lib/node_modules/@humanmade/cf-to-tf/index.js when I run the command, I get the following error.......

[ec2-user@ip-10-204-3-229 bin]$ cf-to-tf ~/IoT-Analytics/Demo/examplestack.json config
/home/ec2-user/.nvm/versions/node/v4.4.5/lib/node_modules/@humanmade/cf-to-tf/lib/shared.js:4
                const { stringify = false, allowMissing = false } = opts;
                      ^

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/ec2-user/.nvm/versions/node/v4.4.5/lib/node_modules/@humanmade/cf-to-tf/lib/configuration.js:1:78)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
nathanielks commented 5 years ago

Hi @marcodatola! I can see you're using node version 4.4.5, which was EOL'd quite a bit of time ago. Can you verify it works on a more up to do date version, using at least Node 8.x?

josegonzalez commented 4 years ago

@nathanielks would it be possible for you to release the update to npm? It seems like the latest release there is 0.1.1 at the moment...

nathanielks commented 4 years ago

Apologies, @josegonzalez! I've went ahead and published 0.1.2 and 0.1.3 (which is a security patch release).

josegonzalez commented 4 years ago

<3 Thanks!