I can't run vue project with Nuxt Fatal Error - vue.js

When I run npm start I am getting an error.
FATAL No build files found in ..\client\.nuxt\dist\server. Use either `nuxt build` or `builder.build()` or start nuxt in development mode.
Use either `nuxt build` or `builder.build()` or start nuxt in development mode.
at VueRenderer._ready (node_modules\#nuxt\vue-renderer\dist\vue-renderer.js:758:13)
at async Server.ready (node_modules\#nuxt\server\dist\server.js:637:5)
at async Nuxt._init (node_modules\#nuxt\core\dist\core.js:482:7)
Nuxt Fatal Error
Error: No build files found in ..\client\.nuxt\dist\server.
Use either `nuxt build` or `builder.build()` or start nuxt in development mode.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! client#1.0.0 start: `nuxt start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Vue version is #vue/cli 4.5.13.
I am vue.js beginner. What is reason? How can I fix it?
Thank you.

try npm run build after that you can use npm start.
alternatively, if you are developing and are not in production use npm run dev.

Related

While upgrading Angular from version 5.0 to 6.1, facing npm Error: Unknown argument: serve

Error: Unknown argument: serve
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! angular-io-example#1.0.0 start: ng serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-io-example#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Please provide some solution for this, as I am stuck, not able to run my Angular application.
Encountered the same problem when setting up my development environment on different machine.
Use npm run serve instead. It worked to me.

nextjs Build failed because of webpack errors on CentOS 7

I want to deploy a nextjs application on a centos server. But when i try to build using npm run build it gives me the following error
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist#latest --update-db
info - Creating an optimized production build
Failed to compile.
ModuleNotFoundError: Module not found: Error: Can't resolve '../context/auth/AuthState' in '/var/www/html/projectname/pages'
> Build error occurred
Error: > Build failed because of webpack errors
at build (/var/www/html/projectname/node_modules/next/dist/build/index.js:15:918)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! client-ubii-app#0.1.0 build: `next build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client-ubii-app#0.1.0 build 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! /root/.npm/_logs/2021-03-31T21_10_01_066Z-debug.log
But when i do the same on my local machine runnig windows 10 it works fine
If you has been change in name of file or folder only case sensitive character, this problem may be happen if your remote branch is not updated. Please, make sure if remote branch has the old name of file or folder. If true, fix it because the CentOs is Linux, so file and folder with same words in lower case is different with upper case.

(npm error) when creating Vue-CLI project

Basically I am trying to create a new Vue-CLI project. However, there is a npm error alert at the very end of the creation:
Vue CLI v4.5.11
✨ Creating project in C:\Eric\apps\vueproj\modal-project.
🗃 Initializing git repository...
⚙️ Installing CLI plugins. This might take a while...
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Eric\AppData\Roaming\npm-cache\_logs\2021-02-05T07_09_25_978Z-debug.log
How can I solve it? Please help me on this...

Unable to build my Vuejs application using npm run build

When I run npm run build in my Vuejs application I get the following error:
compiler.hooks.compilation.tap(
^
TypeError: Cannot read property 'compilation' of undefined
at OptimizeCssAssetsWebpackPlugin.apply (C:\Users\EFOSA\Desktop\my_project\client\node_modules\last-call-webpack-plugin\src\index.js:170:20)
at Compiler.apply (C:\Users\EFOSA\Desktop\my_project\client\node_modules\tapable\lib\Tapable.js:375:16)
at webpack (C:\Users\EFOSA\Desktop\my_project\client\node_modules\webpack\lib\webpack.js:33:19)
at err (C:\Users\EFOSA\Desktop\my_project\client\build\build.js:19:3)
at next (C:\Users\EFOSA\Desktop\my_project\client\node_modules\rimraf\rimraf.js:75:7)
at CB (C:\Users\EFOSA\Desktop\my_project\client\node_modules\rimraf\rimraf.js:111:9)
at C:\Users\EFOSA\Desktop\my_project\client\node_modules\rimraf\rimraf.js:137:14
at FSReqWrap.oncomplete (fs.js:154:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my_project#1.0.0 build: node build/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my_project#1.0.0 build 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\EFOSA\AppData\Roaming\npm-cache_logs\2019-07-02T07_51_40_908Z-debug.log
I'm running webpack 3.12.
Could someone please help me with this?
There is a problem with your configuration and/or plugin version. Check the optimize-css-assets-webpack-plugin documentation:
For webpack v3 or below please use
optimize-css-assets-webpack-plugin#3.2.0. The
optimize-css-assets-webpack-plugin#4.0.0 version and above supports
webpack v4.

Nuxt.js: fsevents is not a constructor

I'm using MacOS Mojave 10.14.5. When I run 'npm run dev' command where the nuxt starter package is located, I have 'fsevents' error, and the server doesn't work.
I already reinstall node and npm several times, but it doesn't work.
Here's an error:
/Users/kimgyun/Desktop/nuxt_test_folder/nuxt_test_b/node_modules/watchpack/node_modules/chokidar/lib/fsevents-handler.js:28
return (new fsevents(path)).on('fsevent', callback).start();
^
TypeError: fsevents is not a constructor
at createFSEventsInstance (/Users/kimgyun/Desktop/nuxt_test_folder/nuxt_test_b/node_modules/watchpack/node_modules/chokidar/lib/fsevents-handler.js:28:11)
at setFSEventsListener (/Users/kimgyun/Desktop/nuxt_test_folder/nuxt_test_b/node_modules/watchpack/node_modules/chokidar/lib/fsevents-handler.js:82:16)
at FSWatcher.FsEventsHandler._watchWithFsEvents (/Users/kimgyun/Desktop/nuxt_test_folder/nuxt_test_b/node_modules/watchpack/node_modules/chokidar/lib/fsevents-handler.js:252:16)
at FSWatcher.<anonymous> (/Users/kimgyun/Desktop/nuxt_test_folder/nuxt_test_b/node_modules/watchpack/node_modules/chokidar/lib/fsevents-handler.js:386:25)
at LOOP (fs.js:1570:14)
at process._tickCallback (internal/process/next_tick.js:61:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nuxt_test_b#1.0.0 dev: `nuxt`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nuxt_test_b#1.0.0 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! /Users/kimgyun/.npm/_logs/2019-06-06T02_11_18_374Z-debug.log
How can I run this nuxt.js server without this error?
It's a problem with fs events, and a rather annoying one at that. Specifically this happens when you're using Node 12.
You'll need to install fsevents#1.2.9 explicitly:
npm i fsevents#1.2.9 -D
or
yarn add fsevents#1.2.9 -D
This should work for you at this point.