astro-php icon indicating copy to clipboard operation
astro-php copied to clipboard

How to use this?

Open Astisme opened this issue 2 years ago • 1 comments
trafficstars

Hi, I've tried using this by downloading the package with npm add astro-php and with npx astro add astro-php; I've also added the new dependency in the astro.config.mjs file.

I get this error when running the npx astro dev command:

Failed to parse URL from ~/path/to/astro/project/node_modules/astro-php/vendor/php-web.wasm
TypeError: Failed to parse URL from ~/path/to/astro/project/node_modules/astro-php/vendor/php-web.wasm
    at Object.fetch (node:internal/deps/undici/undici:11457:11)
  Cause:
TypeError [ERR_INVALID_URL]: Invalid URL
    at new NodeError (node:internal/errors:399:5)
    at new URL (node:internal/url:577:13)
    at new Request (node:internal/deps/undici/undici:7041:25)
    at fetch2 (node:internal/deps/undici/undici:10598:25)
    at Object.fetch (node:internal/deps/undici/undici:11455:18)
    at fetch (node:internal/process/pre_execution:234:25)
    at instantiateAsync (~/path/to/astro/project/node_modules/astro-php/vendor/php-web.js:9:12362)
    at createWasm (~/path/to/astro/project/node_modules/astro-php/vendor/php-web.js:9:12969)
    at ~/path/to/astro/project/node_modules/astro-php/vendor/php-web.js:9:141314
    at PHP.init (file://~/path/to/astro/project/node_modules/astro-php/vendor/php.mjs:18:29)

I've tried reinstalling but it didn't work anyway. Could you please expand the README to help use your integration?

Astisme avatar May 21 '23 08:05 Astisme

Also wondering this.

JaneSmith avatar Sep 17 '24 18:09 JaneSmith