Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run CodeGenerator.js #34

Open
5 tasks done
james10424 opened this issue Sep 15, 2021 · 2 comments
Open
5 tasks done

Cannot run CodeGenerator.js #34

james10424 opened this issue Sep 15, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@james10424
Copy link

Checklist

Environment

Describe your dev environment here, giving as many details as possible. If you have them, make sure to include:

  • Node Version: 15.14.0
  • NPM Version: 7.7.6

Goals

What do you want to achieve?

I want to run CodeGenerator.js as the README.md described.
The command I used to run: npm run build && node lib/CodeGenerator.js python

Expected Results

What do you expect to happen?
CodeGenerator.js successfully executed.

Actual Results

Error: ENOENT: no such file or directory, open '/Users/james/Downloads/programmation/sdk/servers/python/release/setup.py'

What actually happened? Can you provide a stack trace?
It is not able to find the sdk folder. In fact, these are the folders named sdk: (find . -name "sdk" -type d)
./templates/java/examples/src/main/java/com/facebook/ads/sdk
./templates/java/src/main/java/com/facebook/ads/sdk

Also, it is trying to access the parent folder of the repo. (the cwd is: /Users/james/Downloads/programmation/facebook-business-sdk-codegen)

Taking a look at how this path is generated, the path is written inapi_specs/version_path.json, and src/common/Utils.js: loadDefaultSDKVersion went 3 directories back, but __dirname is facebook-business-sdk-codegen/lib/common.

Steps to Reproduce

What are the steps necessary to reproduce this issue?
npm install && npm run build && node lib/CodeGenerator.js python

Code Samples & Details

Please provide a code sample, as well as any additional details, to help us track down the issue. If you can provide a link to a test project that allows us to reproduce the issue, this helps us immensely in both the speed and quality of the fix.

Note: Remember to format your code for readability:

npm install && npm run build && node lib/CodeGenerator.js python

@james10424 james10424 added the bug Something isn't working label Sep 15, 2021
@dpalic
Copy link

dpalic commented Jun 10, 2022

having the same issue here

either steps in documentation are missing, or I am doing something wrong. But basically only 2 steps are required from doc

@kirsar
Copy link

kirsar commented Jun 16, 2022

@dpalic yes, little bit of guidance is missing.
I assume it assumes you have generated sdk already in related folder to get the "current" version.
I'm investigating java sdk, so I just put the sdk into ...\sdk\servers\java\release\

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants