collective / cookiecutter-plone-starter

Cookiecutter Plone Starter is a framework for jumpstarting Plone 6 projects quickly.
MIT License
21 stars 13 forks source link

Project generation fails with FileNotFoundError: [Errno 2] #148

Closed nileshgulia1 closed 5 months ago

nileshgulia1 commented 5 months ago

FileNotFoundError: [Errno 2] No such file or directory: '/Users/nileshgulia/Desktop/test-rss/project-title/frontend/src/addons/volto-project-title/package.json'

Summary:
  - Plone version: 6.0.11
  - Volto version: 17.16.1
  - Volto Generator version: 8.1.4
  OS: MacOS

Command: sudo pipx run cookiecutter gh:collective/cookiecutter-plone-starter

davisagli commented 5 months ago

Are you using a supported version of Node? What is the full stack trace?

nileshgulia1 commented 5 months ago

@davisagli I'm using node v18.17.1, and python 3.8.18. Here's the full traceback:

Traceback (most recent call last):
  File "/tmp/tmphgb20q0u.py", line 320, in <module>
    main()
  File "/tmp/tmphgb20q0u.py", line 294, in main
    prepare_frontend(
  File "/tmp/tmphgb20q0u.py", line 233, in prepare_frontend
    package_data = json.loads(addon_package_json.read_text())
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/pathlib.py", line 1028, in read_text
    with self.open(mode='r', encoding=encoding, errors=errors) as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/pathlib.py", line 1014, in open
    return io.open(self, mode, buffering, encoding, errors, newline)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/nileshgulia/Desktop/test-rss/project-title/frontend/src/addons/volto-project-title/package.json'
ERROR: Stopping generation because post_gen_project hook script didn't exit successfully
Hook script failed (exit status: 1)
nileshgulia1 commented 5 months ago

Perhaps the problem is in the python version.

nileshgulia1 commented 5 months ago

okay, that was an issue with permissions in file system. Fixed it. Sorry for the noise.