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

Error while trying to create a project #148

Open
ahanabhattchrya opened this issue Jul 21, 2022 · 7 comments
Open

Error while trying to create a project #148

ahanabhattchrya opened this issue Jul 21, 2022 · 7 comments

Comments

@ahanabhattchrya
Copy link

Hi, I’ve been trying to create a project for a while now using this repo but I keep getting an error that prevents me to do so. For reference this is what the error looks like - ERROR: Stopping generation because post_gen_project hook script didn't exit successfully Hook script failed (exit status: 1)
I was wondering if there is a solution to this issue yet and/or if there is anything I should change locally to fix it? (If it helps, I’m trying to run it on a Terminal/MacOS)

@marcjulianschwarz
Copy link

I am getting the same error message (running macOS).

@ahanabhattchrya, did you get it working?

@ridhwaanm
Copy link

same error Linux, Node.js v17.9

@dmeinrath
Copy link

#108

this project breaks now for anyone using the current Node LTS version 18

i'm trying to help a client make a build pipeline that converts their react components into there dash application, so I'm trying to figure out how to fix this;
my current understanding:
the Webpack and Webpack CLI versions needs to be updated to 5.0.0 that they support OpenSSL3 in the current Node. However, doing this breaks another dependency called webpack-serve which looks pretty much abandoned

does anyone else more familiar with webpack or react or dash know what webpack-serve actually does here?

for reference: https://github.com/shellscape/webpack-serve

@Elbarto
Copy link

Elbarto commented Dec 8, 2022

Hey,

As I was facing the same issue I tried to find a temporary fix. One way to handle the error is to set the environ variable :
NODE_OPTIONS=--openssl-legacy-provider

To do that you need to edit the hook/post_gen_project.py file

Add the following line before the execution of _execute_command('npm run build:js') at line 93:

  1. Windows : _execute_command("set NODE_OPTIONS=--openssl-legacy-provider")
  2. Linux : _execute_command("export NODE_OPTIONS=--openssl-legacy-provider")

Note this is a temporary fix that can lead to security issue.

@basab-gupta
Copy link

Node LTS version 18

Just wondering, but would using an older version of Node help fix the issue?

@ridhwaanm
Copy link

ridhwaanm commented Jan 30, 2023 via email

@basab-gupta
Copy link

Okay. Here is a short update. I managed to get cookiecutter to run by using an older version of node. @ridhwaanm is right about the security issues though.
Currently using

  • node version (v14.16.0)
  • npm version (6.14.11)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants