Issues trying to generate quasar client with API platform - api-platform.com

So I have created a quasar application and generated the front end using create-client —generator quasar and the options mentioned in the api-platform quasar client docs.
The problem appears when I try to import the route files generated from the create-client command. The js files are imported correctly, but any vue fails to load until I go into the generated files and add .vue to each import statement. Am I missing a step here?
Tried : importing generated Vue components
Expected : routes to work
Result: unable to load imports without .vue extension

Related

importing SVGLoader from three.js giving Gateaway on Vite

I am on vite / vue 3 typescript and tried to import SVG via three.js but following error pops up as soon as I import the SVGLoader
http://localhost:3000/node_modules/.vite/deps/three_examples_jsm_loaders_SVGLoader.js?v=96b3206a net::ERR_ABORTED 504 (Gateway Timeout)
import { SVGLoader } from "three/examples/jsm/loaders/SVGLoader";
Any idea whats causing the gateaway error?
It seems like a Vite bug with module(package) import, according to this github discusstion; and I know for sure because I've come across similar kind of problem when using any kind of unpolished module packages in Vite.
Fortunately, SVGLoader itself is not dependent to any other packages except three.js, so I advise you to copy the SVGLoader code and make it as your own .ts file to include in your project.

ChunkLoadError after deployment to Production ( Vapor + AWS ) [Laravel & Vuejs]

I have developed a small appointment system using Laravel and Vue.js. For deployment purpose, this system has been deployed using Vapor(https://vapor.laravel.com/) and AWS. While the deployment has been successful i.e I can see the login page, login successfully and even perform some functions. However most of the navigation links are not working. The errors that I see in browser console : ChunkLoadError: Loading chunk XY failed at path https://hosturl/js/[file].js
Before deployment when I execute npm run production, I can see that files are being generated in root/public/js. But after deployment the system seems to be unable to find/access them. All the routing has been handled using vue router in the development.
Is this issue somehow related to webpack.mix.js or is the expected folder structure different after being deployed? Am I missing something important here that is needed for production? I am new to Vapor and AWS so help will be really appreciated.

Laravel Nova custom tool creation: vue component not refreshing

I'm using Laravel Nova v1.1.4 within docker container.
I created a new tool via nova:tool command. Everything seems to be ok but everytime I update my vue component (tool.vue) the application does not display the updated data.
I run "npm run dev" from within /nova-components/myComponent/ directory, compiling is working fine but the application does not get updated.
My webpack.mix.js is the following:
let mix = require('laravel-mix')
mix.setPublicPath('dist')
.js('resources/js/tool.js', 'js')
.sass('resources/sass/tool.scss', 'css')
I think is a "refresh" problem, in fact after "npm run dev" execution if I stop and restart the docker containres and refresh the web page then it displays the updated information I included in the vue componenet of the custom tool.
Do yuo have any idea to avoid containers stop/start?
Any help will be great.
Thanks,
MaxdB71
You need to either disabled your cache in Chrome(or your browser of choice):
Or you need to implement versioning:
https://laravel.com/docs/5.7/mix#versioning-and-cache-busting
If you have not done implemented one of these solutions you will simply get served the same file over and over until your cache expires.

vuejs #import not working

Unexpected token import.
While importing vue-form in VueJS with Laravel 5.4 project.
Getting stuck to use vue-form with Laravel.
using this Repository
https://github.com/fergaldoyle/vue-form
Thanks in Advance.
You're probably using this line import VueForm from 'vue-form';
You'll need webpack + babel (or any other module bundler + ES6 compiler).
If you're not using a module bundler you can use the VueForm global which is created.

Bundling JSON data files with Aurelia CLI

I'm using the Aurelia CLI for a data visualization project and can successfully import .json data files from within my src/ directory with
d3.json('src/data/patient-data.json', (data:JSON) => { ... }
when running with "au run" and pointing the browser to localhost:9000.
However, if I open my index.html file statically within a browser, everything else on the page works just fine, except my data won't load and I get the error:
XMLHttpRequest cannot load file:///D:/Webstorm%20Projects/ag-grid-aurelia-example-master/src/data/patient-data.json. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
How can I fix this? And why is it a cross origin request when the file is coming from within my own src directory?
I don't understand why it works fine with 'au run' but not when opened directly from index.html. Does it have something to do with the json file not being included in the bundling process?
And while I'm already using d3 for other things, I'm not necessarily tied to using it to import json files specifically, if that has anything to do with the problem. I just need to load them in somehow.

Resources