Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

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

Open
2 tasks done
colinswinney opened this issue Sep 8, 2022 · 5 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@colinswinney
Copy link

colinswinney commented Sep 8, 2022

Troubleshooting

  • I have attempted to troubleshoot this already

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

  • I agree to follow this project's Code of Conduct
@colinswinney colinswinney added the bug Something isn't working label Sep 8, 2022
@colinswinney colinswinney changed the title Can't Install wp-local-docker Can't Install wp-local-docker Following Initial Setup Instructions Sep 8, 2022
@colinswinney
Copy link
Author

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

  • git clone https://github.com/10up/wp-local-docker-v2.git
  • cd wp-local-docker-v2
  • npm install
  • npm run postinstall
  • npm run 10updocker -- configure
  • sudo ln -s /users/colinswinney/wp-local-docker-v2/index.js /usr/local/bin/10updocker
  • sudo ln -s /users/colinswinney/wp-local-docker-v2/hosts.js /usr/local/bin/10updocker-hosts
  • (A different users path would obviously vary for those last two commands: /path/to/repo/index.js & /path/to/repo/hosts.js ).

The 10updocker command works as expected now.

@firemedialab
Copy link

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
Copy link

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

@jccbbb
Copy link

jccbbb commented Jan 19, 2024

I got this error when running npm install

❯ npm install

[email protected] postinstall
npm run 10updocker postinstall --silent

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

Any clues?

@jccbbb
Copy link

jccbbb commented Jan 20, 2024

I got this error when running npm install

❯ npm install

[email protected] 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? 😊

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants