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?
Related
npm ERR! code EPERM
npm ERR! syscall open
npm ERR! path C:\Users\CypressAutomation\package.json
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, open 'C:\Users\CypressAutomation\package.json'
npm ERR! [Error: EPERM: operation not permitted, open 'C:\Users\CypressAutomation\package.json'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'open',
npm ERR! path: 'C:\Users\CypressAutomation\package.json'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache_logs\2022-11-29T05_56_09_860Z-debug-0.log
npm ERR! code EPERM
npm ERR! syscall open
npm ERR! path C:\Users\CypressAutomation\package.json
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, open 'C:\Users\CypressAutomation\package.json'
npm ERR! [Error: EPERM: operation not permitted, open 'C:\Users\CypressAutomation\package.json'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'open',
npm ERR! path: 'C:\Users\CypressAutomation\package.json'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache_logs\2022-11-29T05_56_09_860Z-debug-0.log
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';
The system cannot find the path specified.
events.js:183
throw er; // Unhandled 'error' event
^
Error: spawn node_modules\webpack\bin\webpack.js ENOENT
at notFoundError (D:\xampp\htdocs\learnlarvel\node_modules\cross-spawn\lib\enoent.js:6:26)
at verifyENOENT (D:\xampp\htdocs\learnlarvel\node_modules\cross-spawn\lib\enoent.js:40:16)
at ChildProcess.cp.emit (D:\xampp\htdocs\learnlarvel\node_modules\cross-spawn\lib\enoent.js:27:25)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # development: cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! Exit status 1
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\iSkylarTechnology\AppData\Roaming\npm-cache_logs\2019-09-14T11_40_34_967Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # dev: npm run development
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\iSkylarTechnology\AppData\Roaming\npm-cache_logs\2019-09-14T11_40_35_155Z-debug.log
Delete your node_modules folder and delete package-lock.json. Run npm cache clear --force and then npm install. Then try npm run dev or npm run watch.
I'm currently following a tooling setup from Bootstrap but I'm really having a hard time trying to understand this.
This is the source of the step-by-step process (https://getbootstrap.com/docs/4.3/getting-started/build-tools/)
Currently, I'm able to run npm scripts (e.g. npm run dist - according to the package.json file from Bootstrap)
During the command ('npm run dist') there's a command being executed as:
node build/build-plugins.js (My Bootstrap root folder doesn't have any build folder!)
Here's the log (using Git Bash - Windows)
> bootstrap#4.3.1 js-compile-plugins C:\Workspace\risco-operacional\RiscoOperacional\packages\bootstrap.4.3.1
> node build/build-plugins.js
> bootstrap#4.3.1 css-compile-docs C:\Workspace\risco-operacional\RiscoOperacional\packages\bootstrap.4.3.1
> cross-env-shell node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 site/docs/$npm_package_version_short/assets/scss/docs.scss site/docs/$npm_package_version_short/assets/css/docs.min.css
> bootstrap#4.3.1 js-compile-plugins-coverage C:\Workspace\risco-operacional\RiscoOperacional\packages\bootstrap.4.3.1
> cross-env NODE_ENV=test node build/build-plugins.js
internal/modules/cjs/loader.js:775
throw err;
^
Error: Cannot find module 'C:\Workspace\risco-operacional\RiscoOperacional\packages\bootstrap.4.3.1\build\build-plugins.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:772:15)
at Function.Module._load (internal/modules/cjs/loader.js:677:27)
at Function.Module.runMain (internal/modules/cjs/loader.js:999:10)
at internal/main/run_main_module.js:17:11 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bootstrap#4.3.1 js-compile-plugins-coverage: `cross-env NODE_ENV=test node build/build-plugins.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bootstrap#4.3.1 js-compile-plugins-coverage 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\srebelo001\AppData\Roaming\npm-cache\_logs\2019-09-01T13_54_39_217Z-debug.log
fs.js:127
throw err;
^
Error: ENOENT: no such file or directory, lstat 'C:\Workspace\risco-operacional\RiscoOperacional\packages\bootstrap.4.3.1\build'
at Object.realpathSync (fs.js:1512:7)
at runRollup (C:\Users\srebelo001\AppData\Roaming\npm\node_modules\rollup\dist\bin\rollup:1312:29)
at Object.<anonymous> (C:\Users\srebelo001\AppData\Roaming\npm\node_modules\rollup\dist\bin\rollup:1363:5)
at Module._compile (internal/modules/cjs/loader.js:936:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
at Module.load (internal/modules/cjs/loader.js:790:32)
at Function.Module._load (internal/modules/cjs/loader.js:703:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:999:10)
at internal/main/run_main_module.js:17:11 {
errno: -4058,
syscall: 'lstat',
code: 'ENOENT',
path: 'C:\\Workspace\\risco-operacional\\RiscoOperacional\\packages\\bootstrap.4.3.1\\build'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bootstrap#4.3.1 js-compile-bundle: `rollup --environment BUNDLE:true --config build/rollup.config.js --sourcemap`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bootstrap#4.3.1 js-compile-bundle 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\srebelo001\AppData\Roaming\npm-cache\_logs\2019-09-01T13_54_39_354Z-debug.log
ERROR: "js-compile-plugins-coverage" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bootstrap#4.3.1 js-compile: `npm-run-all --parallel js-compile-* --sequential js-copy`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bootstrap#4.3.1 js-compile 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\srebelo001\AppData\Roaming\npm-cache\_logs\2019-09-01T13_54_39_938Z-debug.log
ERROR: "js-compile" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bootstrap#4.3.1 js: `npm-run-all js-compile js-minify js-copy`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bootstrap#4.3.1 js 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\srebelo001\AppData\Roaming\npm-cache\_logs\2019-09-01T13_54_39_973Z-debug.log
ERROR: "js" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bootstrap#4.3.1 dist: `npm-run-all --parallel css js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bootstrap#4.3.1 dist 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\srebelo001\AppData\Roaming\npm-cache\_logs\2019-09-01T13_54_40_318Z-debug.log
You propably ran npm install bootstrap command to download the source code of Bootstrap so you're missing build folder.
Try to download the source code with Composer. These steps worked for me:
composer require twbs/bootstrap:4.5.0
cd .\vendor\twbs\bootstrap\
npm install
npm run dist
(Evn.: Windows 10 + PowerShell, installed npm, node.js, Ruby+Devkit with Bundler and Jekyll)
Recommended instructions: https://getbootstrap.com/docs/4.5/getting-started/build-tools/
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