facebook-business-sdk-codegen
facebook-business-sdk-codegen copied to clipboard
Cannot run CodeGenerator.js
Checklist
- [x] I've updated to the latest released version
- [x] I've searched for existing GitHub issues
- [x] I've looked for existing answers on Stack Overflow and the Facebook Developers Group
- [x] I've read the Code of Conduct
- [x] This issue is not security related and can safely be disclosed publicly on GitHub
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
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
@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\