Install bulma in laravel - laravel

I want ton install Bulma via NPM im using NPM install bulma but what should i do after that?
I added bulma snippet in app.scss
// Bulma
#import "node_modules/bulma/bulma";
And when I use NPM run dev I get this error with this log:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'dev' ]
2 info using npm#5.4.2
3 info using node#v8.7.0
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle #~predev: #
6 info lifecycle #~dev: #
7 verbose lifecycle #~dev: unsafe-perm in lifecycle true
8 verbose lifecycle #~dev: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;D:\laragon\www\vue\node_modules\.bin;C:\Users\Mehdi\AppData\Local\Yarn\config\global\node_modules\.bin;C:\Users\Mehdi\AppData\Roaming\npm;C:\Users\Mehdi\AppData\Roaming\Composer\vendor\bin;;D:\laragon\bin\laragon\utils;D:\laragon\bin\mysql\mariadb-10.3.10-winx64\bin;D:\laragon\bin\php\php-7.2.11-Win32-VC15-x64;D:\laragon\bin\composer;D:\laragon\bin\apache\httpd-2.4.35-win64-VC15\bin;D:\laragon\bin\redis\redis-x64-3.2.100;D:\laragon\bin\nginx\nginx-1.14.0;D:\laragon\bin\notepad++;D:\laragon\bin\telnet;D:\laragon\bin\ngrok;D:\laragon\bin;D:\laragon\usr\bin;D:\laragon\bin\putty;D:\laragon\bin\cmder\bin;D:\laragon\bin\cmder\vendor\conemu-maximus5\ConEmu\Scripts;D:\laragon\bin\cmder\vendor\conemu-maximus5;D:\laragon\bin\cmder\vendor\conemu-maximus5\ConEmu;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\nodejs\;C:\Program Files (x86)\Yarn\bin\;C:\Program Files (x86)\Java\jdk1.8.0_112\bin;C:\Users\Mehdi\AppData\Roaming\npm;C:\Users\Mehdi\AppData\Local\Yarn\bin;C:\Users\Mehdi\AppData\Local\atom\bin;C:\Program Files (x86)\Java\jdk1.8.0_112\bin;;D:\laragon\bin\cmder\;
9 verbose lifecycle #~dev: CWD: D:\laragon\www\vue
10 silly lifecycle #~dev: Args: [ '/d /s /c', 'npm run development' ]
11 silly lifecycle #~dev: Returned: code: 1 signal: null
12 info lifecycle #~dev: Failed to exec dev script
13 verbose stack Error: # dev: `npm run development`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:280:16)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at EventEmitter.emit (events.js:213:7)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at ChildProcess.emit (events.js:213:7)
13 verbose stack at maybeClose (internal/child_process.js:927:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid #
15 verbose cwd D:\laragon\www\vue
16 verbose Windows_NT 6.1.7601
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
18 verbose node v8.7.0
19 verbose npm v5.4.2
20 error code ELIFECYCLE
21 error errno 1
22 error # dev: `npm run development`
22 error Exit status 1
23 error Failed at the # dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

You can import bulma in SCSS using
#import "bulma/bulma.sass";

Related

npm run watch says some problems

In the browser: Unable to locate Mix file: /vendor/perfect-scrollbar.css. (View: E:\xampp\htdocs\stacklaravel\resources\views\vendor\stack\partials\header.blade.php)
npm run watch says some problems!
I faced an error npm run watch
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'watch'
1 verbose cli ]
2 info using npm#6.14.10
3 info using node#v14.15.4
4 verbose run-script [ 'prewatch', 'watch', 'postwatch' ]
5 info lifecycle #~prewatch: #
6 info lifecycle #~watch: #
7 verbose lifecycle #~watch: unsafe-perm in lifecycle true
8 verbose lifecycle #~watch: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-
lifecycle\node-gyp-bin;E:\xampp\htdocs\stacklaravel\node_modules.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Git\cmd;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Azure Data Studio\bin;C:\Windows\System32\OpenSSH;C:\OpenSSH-Win64;C:\ProgramData\ComposerSetup\bin;C:\Program Files (x86)\dotnet;C:\Program Files\nodejs;C:\laragon\bin;C:\laragon\bin\apache\httpd-2.4.35-win64-VC15\bin;C:\laragon\bin\composer;C:\laragon\bin\laragon\utils;C:\laragon\bin\mysql\mysql-5.7.24-winx64\bin;C:\laragon\bin\nginx\nginx-1.16.0;C:\laragon\bin\ngrok;C:\laragon\bin\notepad++;C:\laragon\bin\edited\php\php-7.2.19-Win32-VC15-x64;C:\laragon\bin\putty;C:\laragon\bin\redis\redis-x64-3.2.100;C:\laragon\bin\telnet;C:\laragon\usr\bin;C:\Users\Prosigns\AppData\Local\Yarn\config\global\node_modules.bin;C:\Users\Prosigns\AppData\Roaming\Composer\vendor\bin;C:\Users\Prosigns\AppData\Local\Microsoft\WindowsApps;C:\Users\Prosigns\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\Azure Data Studio\bin;F:\xampp\edited\php;E:\xampp\php; C:\Users\Prosigns\AppData\Roaming\Composer\vendor\bin;C:\Users\Prosigns\AppData\Roaming\npm
9 verbose lifecycle #~watch: CWD: E:\xampp\htdocs\stacklaravel
10 silly lifecycle #~watch: Args: [ '/d /s /c', 'mix watch' ]
11 silly lifecycle #~watch: Returned: code: 2 signal: null
12 info lifecycle #~watch: Failed to exec watch script
13 verbose stack Error: # watch: mix watch
13 verbose stack Exit status 2
13 verbose stack at EventEmitter. (C:\Program
Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess. (C:\Program
Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1048:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid #
15 verbose cwd E:\xampp\htdocs\stacklaravel
16 verbose Windows_NT 10.0.16299
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program
Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "watch"
18 verbose node v14.15.4
19 verbose npm v6.14.10
20 error code ELIFECYCLE
21 error errno 2
22 error # watch: mix watch
22 error Exit status 2
23 error Failed at the # watch script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]
What is the cause if these errors? How can i fix it?
This issue is caused by not having nodejs installed or by having an out of date version of nodejs.
When I had this issue I found out I was running node v.10.19.0, I upgraded to 15.6.0 and now it works.
I’m running Ubuntu 20.04, if you are too try the following commands:
sudo apt update
curl -sL https://deb.nodesource.com/setup_15.x | sudo bash -
sudo apt-get install -y nodejs
node -v

How do I have to set up some scripts on windows?

I'm currently using Cypress, and I would like to run some commands. However, I'm pretty new to Windows, and I'm having issues setting up the script to do the right thing.
"scripts": {
"clean:reports": "rm -r -fo cypress\\reports && mkdir cypress\\reports && mkdir cypress\\reports\\mochareports",
"pretest": "npm run clean:reports",
"scripts": "cypress run",
"combine-reports": "mochawesome-merge --reportDir cypress\\reports\\mocha > Cypress\\reports\\mochareports\\reports.json",
"generate-reports": "merge Cypress\\reports\\mochareports\\report.json -f report -o Cypress\\reports\\mochareports",
"posttest": "npm run combine-reports && npm run generate-report",
"test": "npm run scripts || npm run posttest"
}
Error message:
Cypress_Mocha#1.0.0 pretest C:\Users\aharo\Desktop\Automation\Cypress_Mocha
> npm run clean:reports
> Cypress_Mocha#1.0.0 clean:reports C:\Users\aharo\Desktop\Automation\Cypress_Mocha
> rmdir .\cypress\reports && mkdir cypress\reports && mkdir cypress\reports\mochareports
The system cannot find the file specified.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! Cypress_Mocha#1.0.0 clean:reports: `rmdir .\cypress\reports && mkdir cypress\reports && mkdir cypress\reports\mochareports`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the Cypress_Mocha#1.0.0 clean:reports 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\aharo\AppData\Roaming\npm-cache\_logs\2020-12-31T16_54_14_427Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! Cypress_Mocha#1.0.0 pretest: `npm run clean:reports`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the Cypress_Mocha#1.0.0 pretest 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\aharo\AppData\Roaming\npm-cache\_logs\2020-12-31T16_54_14_464Z-debug.log
Is it possible if someone can help me a little bit more to understand what I have to do differently?
If I take a look at the logs through CMD, this is what I have:
0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli 'C:\\Program Files\\nodejs\\node.exe', 1 verbose cli 'C:\\Users\\aharo\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'test' 1 verbose cli ] 2 info using npm#6.14.10 3 info using node#v15.5.0 4 verbose run-script [ 'pretest', 'test', 'posttest' ] 5 info lifecycle Cypress_Mocha#1.0.0~pretest: Cypress_Mocha#1.0.0 6 verbose lifecycle Cypress_Mocha#1.0.0~pretest: unsafe-perm in lifecycle true 7 verbose lifecycle Cypress_Mocha#1.0.0~pretest: PATH: C:\Users\aharo\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\aharo\Desktop\Automation\Cypress_Mocha\node_modules\.bin;C:\Python39\Scripts\;C:\Python39\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs\;C:\Program Files (x86)\Yarn\bin\;C:\Program Files\Git\cmd;C:\Users\aharo\AppData\Local\Microsoft\WindowsApps;C:\Users\aharo\AppData\Roaming\npm;C:\Users\aharo\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\aharo\AppData\Local\Yarn\bin 8 verbose lifecycle Cypress_Mocha#1.0.0~pretest: CWD: C:\Users\aharo\Desktop\Automation\Cypress_Mocha 9 silly lifecycle Cypress_Mocha#1.0.0~pretest: Args: [ '/d /s /c', 'npm run clean:reports' ] 10 silly lifecycle Cypress_Mocha#1.0.0~pretest: Returned: code: 2 signal: null 11 info lifecycle Cypress_Mocha#1.0.0~pretest: Failed to exec pretest script 12 verbose stack Error: Cypress_Mocha#1.0.0 pretest: `npm run clean:reports` 12 verbose stack Exit status 2 12 verbose stack at EventEmitter.<anonymous> (C:\Users\aharo\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16) 12 verbose stack at EventEmitter.emit (node:events:376:20) 12 verbose stack at ChildProcess.<anonymous> (C:\Users\aharo\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 12 verbose stack at ChildProcess.emit (node:events:376:20) 12 verbose stack at maybeClose (node:internal/child_process:1063:16) 12 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:295:5) 13 verbose pkgid Cypress_Mocha#1.0.0 14 verbose cwd C:\Users\aharo\Desktop\Automation\Cypress_Mocha 15 verbose Windows_NT 10.0.18363 16 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\aharo\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "test" 17 verbose node v15.5.0 18 verbose npm v6.14.10 19 error code ELIFECYCLE 20 error errno 2 21 error Cypress_Mocha#1.0.0 pretest: `npm run clean:reports` 21 error Exit status 2 22 error Failed at the Cypress_Mocha#1.0.0 pretest script. 22 error This is probably not a problem with npm. There is likely additional logging output above.
23 verbose exit [ 2, true ]

Webpack 13 verbose stack Error: my-project#1.0.0 build: webpack --mode development

I'm attending a bootcamp running Mac and using windows at home. I downloaded a webpack project from github to run on my windows 7 system and it won't build. I found this error in a search and it advised running
npm install webpack-dev-server#2.9.7 --save-dev
, but the error persists. I tried starting over on my Win10 laptop and i get the same error.
I did find guidance that on package.json, I should change this line:
"start": "npm run build & webpack-dev-server --open --mode development",
The change was previously using a semi-colon instead of "&". Still no joy.
I need some help.
here is the error log:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build'
1 verbose cli ]
2 info using npm#6.12.0
3 info using node#v12.13.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle my-project#1.0.0~prebuild: my-project#1.0.0
6 info lifecycle my-project#1.0.0~build: my-project#1.0.0
7 verbose lifecycle my-project#1.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle my-project#1.0.0~build: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\MP3 Machine\code\doctor-week6-codereview\node_modules\.bin;C:\Users\MP3 Machine\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\MP3 Machine\bin;C:\PROGRAM FILES\COMMON FILES\MICROSOFT SHARED\WINDOWS LIVE;C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT SHARED\WINDOWS LIVE;C:\Windows\SYSTEM32;C:\Windows;C:\Windows\SYSTEM32\WBEM;C:\Windows\SYSTEM32\WINDOWSPOWERSHELL\V1.0;C:\PROGRAM FILES (X86)\MICROSOFT SQL SERVER\80\TOOLS\BINN;C:\PROGRAM FILES (X86)\OPENVPN\BIN;C:\PROGRAM FILES (X86)\WINDOWS LIVE\SHARED;C:\Program Files\WIDCOMM\Bluetooth Software;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files (x86)\QuickTime\QTSystem;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Program Files\MySQL\MySQL Shell 8.0\bin;C:\Users\MP3 Machine\AppData\Local\learn_ide_3\bin;C:\Users\MP3 Machine\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle my-project#1.0.0~build: CWD: C:\Users\MP3 Machine\code\doctor-week6-codereview
10 silly lifecycle my-project#1.0.0~build: Args: [ '/d /s /c', 'webpack --mode development' ]
11 silly lifecycle my-project#1.0.0~build: Returned: code: 2 signal: null
12 info lifecycle my-project#1.0.0~build: Failed to exec build script
13 verbose stack Error: my-project#1.0.0 build: `webpack --mode development`
13 verbose stack Exit status 2
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:210:5)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:210:5)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid my-project#1.0.0
15 verbose cwd C:\Users\MP3 Machine\code\doctor-week6-codereview
16 verbose Windows_NT 6.1.7601
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
18 verbose node v12.13.0
19 verbose npm v6.12.0
20 error code ELIFECYCLE
21 error errno 2
22 error my-project#1.0.0 build: `webpack --mode development`
22 error Exit status 2
23 error Failed at the my-project#1.0.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]
Just had the same problem. Make sure your main (index) HTML file,is "in" the src file

unable to compile assets in production with npm run production

npm run production doesn't run successfully. I have tried to remove the node_modules folder and run npm install but nothing still.
I have also tried to uninstall and install npm from the system but I still am having the same issue.
But watch is running fine but not production.
production script does:
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
I am using npm version 6.7.0 and nodejs version 8.11.4
The script consoles the following error in the npm error log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/local/bin/npm', 'run', 'prod' ]
2 info using npm#6.7.0
3 info using node#v8.11.4
4 verbose run-script [ 'preprod', 'prod', 'postprod' ]
5 info lifecycle #~preprod: #
6 info lifecycle #~prod: #
7 verbose lifecycle #~prod: unsafe-perm in lifecycle true
8 verbose lifecycle #~prod: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/www/html/****/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
9 verbose lifecycle #~prod: CWD: /var/www/html/****
10 silly lifecycle #~prod: Args: [ '-c', 'npm run production' ]
11 silly lifecycle #~prod: Returned: code: 1 signal: null
12 info lifecycle #~prod: Failed to exec prod script
13 verbose stack Error: # prod: npm run production
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid #
15 verbose cwd /var/www/html/****
16 verbose Linux 4.18.0-11-generic
17 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "run" "prod"
18 verbose node v8.11.4
19 verbose npm v6.7.0
20 error code ELIFECYCLE
21 error errno 1
22 error # prod: npm run production
22 error Exit status 1
23 error Failed at the # prod script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
I had same issue because I used to put MIX_SENTRY_DSN_PUBLIC in webpack like this (NOT WORKING):
mix.js('resources/js/app.js', process.env.MIX_SENTRY_DSN_PUBLIC/'public/js')
.sass('resources/sass/app.scss', process.env.MIX_SENTRY_DSN_PUBLIC/'public/css');
instead of:
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css');

Webpack watch script throws an error after couple successfull compiles.Laravel Homestead

Bundle compiles successfully couple of times but then i get this error:
Error:
95% emittingError: UNKNOWN: unknown error, open 'D:\Web Development\Projects\GUIRebuild\public\js\super_admin_bundle.js
'
at Error (native)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # watch: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules
--config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # watch 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\Smolen\AppData\Roaming\npm-cache\_logs\2017-12-01T05_07_28_612Z-debug.log
Log:
0 info it worked if it ends with ok
1 verbose cli [ 'D:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Smolen\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'watch' ]
2 info using npm#5.5.1
3 info using node#v6.11.3
4 verbose run-script [ 'prewatch', 'watch', 'postwatch' ]
5 info lifecycle #~prewatch: #
6 info lifecycle #~watch: #
7 verbose lifecycle #~watch: unsafe-perm in lifecycle true
8 verbose lifecycle #~watch: PATH: C:\Users\Smolen\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;D:\Web Development\Projects\GUIRebuild\node_modules\.bin;%SystemRoot%\system32\WindowsPowerShell\v1.0\;C:\ProgramData\Oracle\Java\javapath;C:\Python27\;C:\Python27\Scripts;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Program Files (x86)\PC Connectivity Solution\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;D:\HashiCorp\Vagrant\bin;D:\Program Files\Git\cmd;D:\Program Files\nodejs\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\ProgramData\chocolatey\bin;C:\Program Files\Lenovo\Bluetooth Software\;C:\Program Files\Lenovo\Bluetooth Software\syswow64;D:\Program Files (x86)\PuTTY\;C:\Users\Smolen\AppData\Local\atom\bin;C:\Users\Smolen\AppData\Roaming\npm;D:\Users\Smolen\AppData\Local\Android\sdk\platform-tools;
9 verbose lifecycle #~watch: CWD: D:\Web Development\Projects\GUIRebuild
10 silly lifecycle #~watch: Args: [ '/d /s /c',
10 silly lifecycle 'cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js' ]
11 silly lifecycle #~watch: Returned: code: 1 signal: null
12 info lifecycle #~watch: Failed to exec watch script
13 verbose stack Error: # watch: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\Smolen\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:280:16)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at EventEmitter.emit (events.js:191:7)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\Smolen\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at ChildProcess.emit (events.js:191:7)
13 verbose stack at maybeClose (internal/child_process.js:920:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
14 verbose pkgid #
15 verbose cwd D:\Web Development\Projects\GUIRebuild
16 verbose Windows_NT 6.1.7601
17 verbose argv "D:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Smolen\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "watch"
18 verbose node v6.11.3
19 verbose npm v5.5.1
20 error code ELIFECYCLE
21 error errno 1
22 error # watch: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
22 error Exit status 1
23 error Failed at the # watch script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
I have no idea why is this happening, i am using vagrant and virtual box but this compiles on my machine not on the virtual one.I get this "Unknown error" on random files.
What i have tried:
Remove/Reinstall node_modules
Upgrade Node and NPM
Clear NPM cache
OS: Windows 7
Laravel: 5.4v
NPM: 5.5.1v
You can try removing node_modules folder and run again
npm install
In my case the output directory was corrupted and could not be opened anymore, so webpack could not access it.
Working around that by checking out the project in another location was the fastest solution, as deleting the directory was not easy and required repairing the drive with the windows repair tool (Right-Click in File Manager on Drive -> Properties -> Tools -> Disk Check).

Resources