Giter VIP home page Giter VIP logo

Comments (4)

juanmaguitar avatar juanmaguitar commented on June 17, 2024

Oks, I solved the issue by removing the repo and cloning it again and using only local packages (removing global installation of nx)

  1. Cloned the repo git clone -b trunk --single-branch --depth 1 [email protected]:WordPress/wordpress-playground.git
  2. cd wordpress-playground
  3. npm install
  4. npm add --global nx@latest
  5. npm run build:docs

from wordpress-playground.

juanmaguitar avatar juanmaguitar commented on June 17, 2024

I think the following instructions in the README may lead to local errors

And here's a few more interesting CLI commands, which expect that you have nx installed globally:
...
# Builds the documentation site
nx build docs-site

As installing nx globally installs a different version that seems to be incompatible with the internal scripts

⬢  wordpress-playground  trunk ⦿ npm add --global nx

added 111 packages in 2s

21 packages are looking for funding
  run `npm fund` for details
⬢  wordpress-playground  trunk ⦿ nx --version
Nx Version:
- Local: v16.9.0
- Global: v18.3.3

At package.json there's an overrides set to "nx": "16.9.0", which makes me think this specific version of nx is a requirement

from wordpress-playground.

juanmaguitar avatar juanmaguitar commented on June 17, 2024

In the README, I would stick to the local scripts set in the package to avoid errors and change this part to something like...

And here's a few more interesting scripts you can run in this repo:

# Build and run PHP.wasm CLI
npx nx start php-wasm-cli

# Build latest WordPress releases
npx nx bundle-wordpress:all playground-wordpress

# Recompile PHP 5.6 - 8.2 releases to .wasm for web
npx nx recompile-php:all php-wasm-web

# Recompile PHP 5.6 - 8.2 releases to .wasm for node
npx nx recompile-php:all php-wasm-node

# Builds the documentation site
npx nx build docs-site

# Builds the Playground Client npm package
npx nx build playground-client

# Bonus: Run PHP.wasm in your local CLI:
npx @php-wasm/cli -v
PHP=7.4 npx @php-wasm/cli -v
npx @php-wasm/cli phpcbf

from wordpress-playground.

juanmaguitar avatar juanmaguitar commented on June 17, 2024

Closed as per #1330

from wordpress-playground.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.