Laravel project stops building with Datatables.net build issue - laravel

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?

Related

ERR! build error when I tried use a template

I try to use a Vue template, but when I try to run npm install, I get this errors:
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
npm ERR! node-sass#6.0.1 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#6.0.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I tried deleting node_modules and package-lock.json and re running npm install, but this doesn’t work.

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?

npm run dev command throwing error laravel 9.21.6

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

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';

Can't install socket.io on windows 7 64 bits

I've been trying to download socket.io for nodejs but every time I do I keep getting this error.
I am running it as an administrator but for some reason my system does not recognize that I am running this as one. Does anyone know why this is happening?
It keeps spitting back out code like this:
npm ERR! node v0.12.2 npm ERR! npm v2.7.4 npm ERR! code EACCES npm
ERR! errno EACCES npm ERR! syscall connec
npm ERR! Error: connect EACCES npm ERR! at
exports._ernoException
npm ERR! { [Error: connect EACCES] code: 'EACCES', eerno, 'EACCES',
syscall: connect'}
npm ERR! Please try running this command again as root/administrator
npm ERR! Please include the following file with any support request:
C:\Windows\System32\npm-debug.log

Resources