2

started installing plugins to my Laravel project.

    1. Laravel new public
    1. npm install
    1. composer require laravel / ui
    1. php artisan ui vue
    1. npm install -D tailwindcss @ latest postcss @ latest autoprefixer @ latest
    1. npx tailwindcss init
    1. add line in tailwind.config.js purge: [ './resources//*.blade.php', './resources//.js', './resources/**/.vue', ],
    1. add line in webpack.mix.js require ("tailwindcss"),
    1. Add im resource / css / app.css 3-line @tailwind base; @tailwind components; @tailwind utilities;
    1. add link stylesheet in main template file (main.blade.php) {{asset ('css / app.css')}}

After all the monipulations mentioned above, I execute the command npm install && npm run dev, and I get an error

> npm run development


> @ development D:\laravel\public
> mix


× Mix
  Compiled with some errors in 6.30s

ERROR in ./resources/js/components/ExampleComponent.vue 1:0
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> <template>
|    <div>
|        <h3>Hey</h3>

webpack compiled with 1 error
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: `mix`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\****\AppData\Roaming\npm-cache\_logs\2021-02-26T09_06_38_033Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\***\AppData\Roaming\npm-cache\_logs\2021-02-26T09_06_38_066Z-debug.log
Yura Lons
  • 71
  • 1
  • 7
  • Does this answer your question? [How to fix the error "You may need an appropriate loader to handle this file type"](https://stackoverflow.com/questions/65607153/how-to-fix-the-error-you-may-need-an-appropriate-loader-to-handle-this-file-typ) – Kamlesh Paul Feb 26 '21 at 09:29
  • I looked for a long time where the error was, it turned out to be a basal one, I connected .view() for the place .vue() – Yura Lons Feb 26 '21 at 11:40

1 Answers1

0

Would you try these two solutions

1 - Run MacOS Or Windows super user 1.1 MacOS sudo npm run development 1.2 Windows right click terminal open with Administrator

2- Cleen code <a href="..."></a> to <a href="#"></a>

Yunus Kocabay
  • 133
  • 10