Skip to content
This repository was archived by the owner on Mar 12, 2024. It is now read-only.
This repository was archived by the owner on Mar 12, 2024. It is now read-only.

file_put_contents(....): Failed to open stream: No such file or directory #2

@takielias

Description

@takielias

I'm getting the following error when I execute composer build

OS: Windows 11
PHP: 8.2
Local Environment: Laragon

[laravel-splade-vite] Command failed with exit code 1: php vendor/bin/testbench splade:core:build-components --unprocessed
Done!

Searching for components in D:\laravel\splugin\vendor\orchestra\testbench-core\laravel\resources\views
Searching for components in D:\laravel\splugin\workbench\app\Providers/../../../resources/views
Compiling D:\laravel\splugin\workbench\app\Providers/../../../resources/views\components\example.blade.php

   ErrorException

  file_put_contents(D:\laravel\splugin\workbench\app\Providers/../../../resources/js/splade\Splade\components\example.vue): Failed to open stream: No such file or directory

  at vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php:205
    201▕      * @return int|bool
    202▕      */
    203▕     public function put($path, $contents, $lock = false)
    204▕     {
  ➜ 205return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
    206▕     }
    207208/**
    209▕      * Write the contents of a file, replacing it atomically if it already exists.

  1   vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php:205

  2   vendor\protonemedia\laravel-splade-core\src\BladeViewExtractor.php:141
      Illuminate\Filesystem\Filesystem::put("D:\laravel\splugin\workbench\app\Providers/../../../resources/js/splade\Splade\components\example.vue", "<script setup>
import { h,ref } from 'vue';
const props = defineProps(['spladeTemplateId']);

    const message = ref('Hello World')

const spladeRender = h({

    name: "Splade\components\exampleRender",

    template: spladeTemplates[props.spladeTemplateId],
    data: () => { return { ...props,message } }
});
</script>
<template><spladeRender /></template>")

error during build:
Error: Command failed with exit code 1: php vendor/bin/testbench splade:core:build-components --unprocessed
Done!

Searching for components in D:\laravel\splugin\vendor\orchestra\testbench-core\laravel\resources\views
Searching for components in D:\laravel\splugin\workbench\app\Providers/../../../resources/views
Compiling D:\laravel\splugin\workbench\app\Providers/../../../resources/views\components\example.blade.php

   ErrorException

  file_put_contents(D:\laravel\splugin\workbench\app\Providers/../../../resources/js/splade\Splade\components\example.vue): Failed to open stream: No such file or directory

  at vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php:205
    201▕      * @return int|bool
    202▕      */
    203public function put($path, $contents, $lock = false)
    204▕     {
  ➜ 205▕         return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
    206▕     }
    207208▕     /**
    209▕      * Write the contents of a file, replacing it atomically if it already exists.

  1   vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php:205

  2   vendor\protonemedia\laravel-splade-core\src\BladeViewExtractor.php:141
      Illuminate\Filesystem\Filesystem::put("D:\laravel\splugin\workbench\app\Providers/../../../resources/js/splade\Splade\components\example.vue", "<script setup>
import { h,ref } from 'vue';
const props = defineProps(['spladeTemplateId']);

    const message = ref('Hello World')

const spladeRender = h({

    name: "Splade\components\exampleRender",

    template: spladeTemplates[props.spladeTemplateId],
    data: () => { return { ...props,message } }
});
</script>
<template><spladeRender /></template>")

    at makeError (file:///D:/laravel/splugin/node_modules/@protonemedia/laravel-splade-vite/dist/index.mjs:1263:11)
    at handlePromise (file:///D:/laravel/splugin/node_modules/@protonemedia/laravel-splade-vite/dist/index.mjs:2368:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async run (file:///D:/laravel/splugin/node_modules/@protonemedia/laravel-splade-vite/dist/index.mjs:2422:42)
    at async Object.buildStart (file:///D:/laravel/splugin/node_modules/@protonemedia/laravel-splade-vite/dist/index.mjs:2463:7)
    at async Promise.all (index 2)
    at async PluginDriver.hookParallel (file:///D:/laravel/splugin/node_modules/rollup/dist/es/shared/node-entry.js:25472:9)
    at async file:///D:/laravel/splugin/node_modules/rollup/dist/es/shared/node-entry.js:26704:13
    at async catchUnfinishedHookActions (file:///D:/laravel/splugin/node_modules/rollup/dist/es/shared/node-entry.js:25910:16)
    at async rollupInternal (file:///D:/laravel/splugin/node_modules/rollup/dist/es/shared/node-entry.js:26701:5)
Script npm run build handling the build event returned with error code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions