10up / wp-local-docker-v2

ARCHIVED: A simple Docker based development environment for WordPress.
MIT License
484 stars 82 forks source link

Can't Install wp-local-docker Following Initial Setup Instructions #314

Open colinswinney opened 2 years ago

colinswinney commented 2 years ago

Troubleshooting

Describe the bug

When running the initial command, npm install -g wp-local-docker, the install halts after this step:

(##################) ⠼ reify:rxjs: timing reifyNode:node_modules/wp-local-docker/node_modules/lodash Completed in 511ms

According to the log attached below, It appears to fail at line 1224 because the final directory in the path, wp-local-docker, doesn't exist.

Steps to Reproduce

Follow the prerequisites for MacOS and the install steps outlined in the repo's README.

Screenshots, screen recording, code snippet

Initial run of the command up to the line where it hangs: Screen Shot 2022-09-08 at 1 58 56 PM

I then have to ^ + c to halt the process resulting in the following: Screen Shot 2022-09-08 at 2 02 12 PM

The log can be viewed here: 2022-09-08T18_58_16_309Z-debug-0.log

Environment information

Device: MacBook Pro (14-inch, 2021) - M1 Pro chip OS: 12.4 Docker Desktop version: 4.12.0 Node version: 16.17.0

Code of Conduct

colinswinney commented 2 years ago

With very generous help from @eugene-manuilov, I was able to get this setup. The steps we took were as follows:

The 10updocker command works as expected now.

firemedialab commented 1 year ago

Appreciate efforts to find a solution and post work around. I was running into the same issue on Ubuntu 22.04 and this provided a path forward.

miguelperez commented 1 year ago

I was able to run in following this work around too. But for me I had to run it using npm run.

jccbbb commented 10 months ago

I got this error when running npm install

❯ npm install

wp-local-docker@4.0.0 postinstall npm run 10updocker postinstall --silent

/usr/bin/env: ‘node\r’: No such file or directory

Any clues?

jccbbb commented 10 months ago

I got this error when running npm install

❯ npm install

wp-local-docker@4.0.0 postinstall npm run 10updocker postinstall --silent

/usr/bin/env: ‘node\r’: No such file or directory

Any clues?

I solved it by running git config --global core.autocrlf input. Must be something with line endings that is incorrect it the repo.

UPDATE: after I updated the git config with git config --global core.autocrlf input did it also work to install it the regular way with npm install -g wp-local-docker. @eugene-manuilov can you maybe take a look on this and maybe add it to the README if that solution works? 😊