strapi-community / strapi-tool-dockerize

Easy add support for docker to your strapi project
MIT License
504 stars 34 forks source link

generate fail on windows #98

Closed ausir0726 closed 3 months ago

ausir0726 commented 8 months ago

🐛 Bug Report

image

generate fail on windows but success on docker linux ( on windows )

🤷‍♀️ What did you do

npx @strapi-community/dockerize

⛔️ Error log

🕵️‍♀️ Stack trace

�  Creating Strapi Project from npx create-strapi-app@latest - please wait...

node:events:495
      throw er; // Unhandled 'error' event
      ^

Error: spawn npx ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:284:19)
    at onErrorNT (node:internal/child_process:477:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:290:12)
    at onErrorNT (node:internal/child_process:477:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn npx',
  path: 'npx',
  spawnargs: [
    'create-strapi-app@latest',
    'C:\\Users\\ausir\\test/sss',
    '--quickstart',
    '',
    '--no-run'
  ]
}

Node.js v18.18.2

🙇‍♀️ Expected behavior/code

A clear and concise description of what you expected to happen (or code).

👩‍💻 Environment

💡 Possible Solution

📺 Additional context/Screenshots

Eventyret commented 8 months ago

Seems to be a issue with \ paths in windows thank you will investigate this.

ospirentos commented 7 months ago

Until this issue is fixed, you can run "npx @strapi-community/dockerize" in an existing strapi project to dockerize it

AndreasScharfCPB commented 3 weeks ago

Hi @Eventyret , I still get this issue. With v1.16.2 It always seems to add /[projectName] to the path which ist something like C:\myPath\someFolder/[projectName]

Eventyret commented 3 weeks ago

Currently reworking the cli and its on my radara work around is to create a strapi app as normal then use the tool inside of it

AndreasScharfCPB commented 3 weeks ago

Thanks. I just thought because it is labeled as "completed", I would tell you that the issue still exists. :-)