Skip to content

error whem building a project which has this lib #6

Description

@isVivek99

i installed this plugin and tried creating a build by following the readme i got an error which says

ENOENT: no such file or directory, rename '/Users/viveklokhande/Desktop/OSS/astro/examples/basics/dist/' -> '../wp-path/wp-content/themes/my-theme'
  Location:
    /Users/viveklokhande/Desktop/OSS/astro/node_modules/.pnpm/astro-wordpress@0.0.8/node_modules/astro-wordpress/lib/index.js:155:17
  Stack trace:
    at async rename (node:internal/fs/promises:778:10)
    at async withTakingALongTimeMsg (file:///Users/viveklokhande/Desktop/OSS/astro/packages/astro/dist/integrations/hooks.js:32:12)
    at async runHookBuildDone (file:///Users/viveklokhande/Desktop/OSS/astro/packages/astro/dist/integrations/hooks.js:456:5)
    at async AstroBuilder.run (file:///Users/viveklokhande/Desktop/OSS/astro/packages/astro/dist/core/build/index.js:185:7)
    at async build (file:///Users/viveklokhande/Desktop/OSS/astro/packages/astro/dist/cli/build/index.js:29:3)

I have added this in the config file:

import { defineConfig } from 'astro/config';
import wordpress from "astro-wordpress";

// https://astro.build/config
export default defineConfig({
  adapter: wordpress({
    devProxyTarget: "http://localhost:8001", // Your local WordPress URL
    outDir: "../wp-path/wp-content/themes/my-theme", // Output theme directory
  }),
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions