Opened 5 years ago
Closed 2 years ago
#48288 closed defect (bug) (invalid)
WordPress Installation - "npm run env:start" not working on windows
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.3 |
Component: | Build/Test Tools | Keywords: | reporter-feedback close |
Focuses: | Cc: |
Description
Command
npm run env:start
seems to be not working on Windows
Steps to reproduce:
- Open windows environment.
- Clone WP Trunk -
git clone git://develop.git.wordpress.org/ wp-trunk
- Navigate to cloned directory -
cd wp-trunk
- Install npm for the project -
npm install
- Got an error for PhantomJS -
PhantomJS not found on PATH Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-windows.zip Saving to C:\Users\PREMAN~1\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip Receiving... Error making request. Error: getaddrinfo ENOTFOUND github-production-release-asset-2e65be.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com:443 at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:57:26)
Screenshot: https://cl.ly/4f89e35a9128
- Installed PhantomJS using NPM -
npm install phantomjs-prebuilt
- Ran
npm install
again and it working without any errors
- Ran
npm run env:start
Command but it failed with the following errors:
'docker-compose' is not recognized as an internal or external command, operable program or batch file. child_process.js:662 throw err;
Screenshot: https://cl.ly/08c56b836dce
There are 2 points I'm concerned with
- PhantomJS should get installed as a dependency while running
npm install
- The errors I'm getting while running
npm run env:start
Change History (6)
This ticket was mentioned in Slack in #core by veminom. View the logs.
5 years ago
#4
@
4 years ago
- Keywords reporter-feedback added; needs-patch removed
Hi @veminom!
Are you still experiencing this issue? I can't be certain, but the error message you shared seems to be a problem with NPM downloading the PhantomJS package. The second message seems to indicate Docker is not installed or available.
Can you please confirm that Docker was installed and running when you ran those commands? Also, I did find some StackOverflow posts that indicated some users needed to restart Docker after installing in order for it to work properly.
#5
@
2 years ago
- Keywords close added
Docker Desktop does not ship with the old docker-compose
.
'docker-compose' is not recognized as an internal or external command, operable program or batch file.
If this still happens for you, ensure that Docker Compose V1/V2 compatibility mode is enabled. This creates an "alias" for the new docker compose
. See https://www.docker.com/blog/announcing-compose-v2-general-availability/
Image showing what this looks like in the Docker Desktop General Settings. Note that this image was taken on a Linux machine, but the same thing applies to Windows.
Hey @veminom! I just started doing some dev with WP, and also use Windows. Have you installed Docker, as mentioned in README.md in the repo and in https://make.wordpress.org/core/2019/08/05/wordpress-local-environment/?