npm run dev command throwing error laravel 9.21.6 - laravel

When i am opening a page it shows error
Vite manifest not found at: C:\xampp\htdocs\laravel_project\lara_project\public/build/manifest.json
and my command prompt showing error
# dev C:\xampp\htdocs\laravel_project\lara_project
vite
internal/process/esm_loader.js:74
internalBinding('errors').triggerUncaughtException(
^
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. Received protocol 'node:'
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:756:11)
at Loader.resolve (internal/modules/esm/loader.js:85:40)
at Loader.getModuleJob (internal/modules/esm/loader.js:229:28)
at ModuleWrap. (internal/modules/esm/module_job.js:51:40)
at link (internal/modules/esm/module_job.js:50:36) {
code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # dev: vite
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\Sudha\AppData\Roaming\npm-cache_logs\2022-07-24T09_53_42_124Z-debug.log

Related

Why laravel mix copy function does not work?

im tryng to make a copy of a js file that exist in node_modules to the public folder to try to use the javascript files on node_modules only when i need in specific parts of the system.
when i try to make a copy using mix.copy('node_modules/select2/dist/select2.min.js', 'public/vendor/js/'). the error i get is:
[webpack-cli] [Error: ENOENT: no such file or directory, lstat 'C:\laragon\www\project\node_modules\select2\dist\select2.min.js'] {
errno: -4058,
code: 'ENOENT',
syscall: 'lstat',
path: 'C:\\laragon\\www\\project\\node_modules\\select2\\dist\\select2.min.js'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! # development: `mix`
npm ERR! Exit status 2
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\OfficeUser\AppData\Roaming\npm-cache\_logs\2023-01-10T15_51_48_679Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! # dev: `npm run development`
npm ERR! Exit status 2
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\OfficeUser\AppData\Roaming\npm-cache\_logs\2023-01-10T15_51_48_721Z-debug.log
What should i do now, is the file path incorrectly written?

Laravel project stops building with Datatables.net build issue

I am working on a Laravel project hosted on Heroku. A few days ago, it stopped building and produced the following error message.
ℹ Compiling Mix
[webpack-cli] [Error: ENOENT: no such file or directory, open '/tmp/src/js/vendors/plugins/datatables.init.js'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/tmp/src/js/vendors/plugins/datatables.init.js'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! undefined postinstall: npm run production
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the undefined postinstall 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! /tmp/npmcache.xfkpj/_logs/2021-11-10T16_57_33_522Z-debug.log
Any ideas?

Laravel - npm run dev - Failed to find '~#fortawesome/fontawesome-pro/css/all.min.css'

I have created a project in Laravel 8, and when I run npm run dev it throws the following error:
ERROR in ./resources/sass/app.scss (./node_modules/css-loader??ref--5-2!./node_modules/postcss-loader/src??postcss0!./node_modules/resolve-url-loader??ref--5-4!./node_modules/sass-loader/dist/cjs.js??ref--5-5!./resources/sass/app.scss)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: Failed to find '~#fortawesome/fontawesome-pro/css/all.min.css'
in [
/Users/me/Laravel/<projectName>/resources/sass
]
at resolveModule.catch.catch (/Users/me/Laravel/<projectName>/node_modules/postcss-import/lib/resolve-id.js:35:13)
at <anonymous>
# ./resources/sass/app.scss 2:14-253
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! # development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 2
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! /Users/me/.npm/_logs/2020-12-30T08_24_47_410Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! # dev: `npm run development`
npm ERR! Exit status 2
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! /Users/me/.npm/_logs/2020-12-30T08_24_47_441Z-debug.log
My resources/sass/app.scss looks like this:
#import '~#fortawesome/fontawesome-pro/css/all.min.css';
I've tried with #import 'node_modules/#fortawesome/fontawesome-pro/css/all.min.css' as well, but that doesn't work either.
I can see all.min.css in the tree when I follow the path node_modules/#fortawesome/fontawesome-pro/css/all.min.css so I know for a fact that it's there.
Any help would be appreciated
You need to remove the ~ before the import line:
#import '#fortawesome/fontawesome-pro/css/all.min.css';

STRAPI : Error while running command develop: undefined

I am not able to npm start STRAPI, it shows follwiting error. I'm using STRAPI 3.1.3
> my-project#0.1.0 strapi /Users/mac/Documents/Development_env/jobBackend/my-project
> strapi "develop"
Error while running command develop: undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-prject#0.1.0 strapi: `strapi "develop"` npm ERR! Exit status 1
npm ERR!
macs-Air:my-project mac$ npm start
> my-project#0.1.0 start /Users/mac/Documents/Development_env/jobBackend/my-project
> strapi start
Error while running command start: undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-project#0.1.0 start: `strapi start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-project#0.1.0 start 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/mac/.npm/_logs/2020-08-13T17_02_08_854Z-debug.log
I just saw this error too. I upgraded to strapi 3.1.4 and got a more useful error indicating a syntax error in one of my functions files. After fixing that, strapi commands worked as ever.
npm run build
npm start
Or install strapi-cli globally using below command.
npm install -g strapi#beta
After successful installation use
strapi develop
to start the project

How to resolve problem with webpack in angular universal project?

when i am converting angular project to universal. webpack is installed automatically then when i'm trying to build for ssr it is showing message that webpack-cli and webpack-command both are installed. then i uninstalled one of then still it is not working. also node dist/server command is not recognized by angular-cli.
please help..
I tried to uninstall webpack-cli.
× 「webpack」: Flags were specified that were not recognized:
--colors Not sure what you mean there
Please check the command executed.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sample-project#0.0.0 compile:server: webpack --config webpack.server.config.js --progress --colors
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sample-project#0.0.0 compile:server 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\gpw\AppData\Roaming\npm-cache_logs\2019-06-13T05_17_21_908Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sample-project#0.0.0 build:ssr: npm run build:client-and-server-bundles && npm run compile:server
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sample-project#0.0.0 build:ssr 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\gpw\AppData\Roaming\npm-cache_logs\2019-06-13T05_17_21_995Z-debug.log

Resources