Using `--from` w/ file or remote repository format fails when the source descends from PythonProject.
See original GitHub issueAssuming we have a simple project defined locally as follows (that descends from JSIIProject):
in templates/src/index.ts:
export class MyProject extends python.PythonProject {
constructor(options: python.PythonProjectOptions) {
super(options);
}
}
After building the project and compiling the JSII, when I try to use the template from another project directory, such as new_project
:
projen new --from file:../templates
I get the following error:
Error: Cannot find module 'templates/.jsii'
If you try the same using a remote repository, you will get:
Error: Cannot find module 'git/.jsii'
I looked into the code, and it looks like this is erroring at this point:
Installing from an NPM or private NPM server still works.
Issue Analytics
- State:
- Created a year ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
git: fatal: Could not read from remote repository - Stack Overflow
First please look at .git/config file and see everything is in order. It had wrong set-url and origin values for me. – mixdev....
Read more >Troubleshooting cloning errors - GitHub Docs
In this article. HTTPS cloning errors. Error: Repository not found. Error: Remote HEAD refers to nonexistent ref, unable to checkout.
Read more >Work with notebooks and other files in Databricks Repos
Learn how to work with notebooks and other files in Databricks Repos integrated with a remote Git repository.
Read more >Introduction to Git and GitHub for Python Developers
In this tutorial, I'll walk you through what Git is, how to use it for your personal projects, and how to use it...
Read more >Create Your Custom, private Python Package That You Can ...
Share your self-built Python package using your git repo. ... They send us a data file with a specific question like, “What type...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@orlandronen1 thanks for the tip, renaming the tarball did work
works:
npx projen new zaiPython --packageManager npm --from /home/zmully/gitwork/python-test-2/dist/js/python-test-2.tgz
does not work:
npx projen new zaiPython --packageManager npm --from python-test-2@/home/zmully/gitwork/python-test-2/dist/js/python-test-2.tgz
npx projen new zaiPython --packageManager npm --from "python-test-2@/home/zmully/gitwork/python-test-2/dist/js/python-test-2.tgz"
npx projen new zaiPython --packageManager npm --from "python-test-2@/home/zmully/gitwork/python-test-2/dist/js/python-test-2@0.0.0.jsii.tgz"
And like you said, pulling from a registry solves many of these issues, but it’d be great if that friction could be removed to speed up development.
@mrgrain still not working with the package name addition: