Skip to content
This repository has been archived by the owner on Oct 13, 2020. It is now read-only.

npm start doesn't generate _nuxt folder #35

Open
maverick504 opened this issue Oct 11, 2019 · 3 comments
Open

npm start doesn't generate _nuxt folder #35

maverick504 opened this issue Oct 11, 2019 · 3 comments

Comments

@maverick504
Copy link

I was all day trying to make this package work, but the only way i could make it work was using npm run build and then npm start, obviously that's isn't confortable to work, it should work with npm start and rebuild automatically as i make changes on the code.

Aparently, npm start is detecting changes and all, but is generating all files in the .nuxt folder, not in the _nuxt folder, so i get an error like file_get_contents(/my-project/public/_nuxt/index.html): failed to open stream: No such file or directory.

I've tried with starter projects, like areindl/laravel-nuxt-starter-project
and a few others, but i always face the same problem.

I'm not sure if the problem is about nuxt or is that i'm using linux.

Anyone got the same problem?

@skyrpex
Copy link
Owner

skyrpex commented Oct 11, 2019

Hi!

In the readme I recommend to alias npm start to laravel-nuxt, which is the same as laravel-nuxt dev. This command runs the following for you: nuxt dev and php artisan serve (it also does some inner wiring so it works out of the box). Basically, after running laravel-nuxt dev it should just work if you open the suggested URL.

nuxt dev doesn't put any files in the _nuxt directory. Instead, it uses generates all the files in memory (because it's much faster). The _nuxt directory is only created after running nuxt build, being the equivalent to larave-nuxt build.

@maverick504
Copy link
Author

Hello again, sorry for the late reply, i went on a trip this weekend and didn't was able to code anything.

I've started a new project and actually followed the readme and it worked!

Previously i was following your tutorial on dev.to, wich gived me problems so i've tried with cloning boilerplates that i've found on GitHub, wich also gived me problems.

Also i've noticed that if i run laravel-nuxt build one time i cannot use laravel-nuxt dev anymore, even deleting node_modules and vendor and reinstalling the packages.

@skyrpex
Copy link
Owner

skyrpex commented Oct 14, 2019

Also i've noticed that if i run laravel-nuxt build one time i cannot use laravel-nuxt dev anymore, even deleting node_modules and vendor and reinstalling the packages.

What error do you get when running laravel-nuxt dev after laravel-nuxt build?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants