mix.version() error: Error: ENOENT: no such file or directory, open '/css/app.css'
See original GitHub issueI’m using standalone version of laravel-mix@1.6.1
with npm@5.5.1
and I’m only compiling scss
file:
let mix = require('laravel-mix');
mix
.setPublicPath('/')
.sass('scss/app.scss', 'css/')
.sourceMaps()
.version();
When run with version()
it throws an error:
fs.js:646
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT: no such file or directory, open '/css/app.css'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
...
When I remove call to version()
- it does compile without any issues, but of course, manifest does not have version parameter.
I also tried to changing the public path to the relative ./
:
let mix = require('laravel-mix');
mix
.setPublicPath('./')
.sass('scss/app.scss', 'css/')
.sourceMaps()
.version();
but this has resulted with the same error (except for the path, which now was showing as absolute) and mix-manifest.json
has cut first letter from the directory - still without the version present:
{
"/ss/app.css": "/ss/app.css"
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Error: ENOENT: no such file or directory, open '/css ... - GitHub
I'm using standalone version of laravel-mix@1.6.1 with npm@5.5.1 and I'm only compiling scss file: let mix = require('laravel-mix'); mix .
Read more >NPM Run Development. ENOENT: no such file or directory
Fixed. just need to follow the path mix is looking for. changed my webpack.mix.js sass('resources/assets/sass/desktop.scss', ...
Read more >Error: ENOENT: no such file or directory, open '/css/app.css'
I'm using standalone version of laravel-mix@1.6.1 with npm@5.5.1 and I'm only compiling scss file: let mix = require('laravel-mix'); mix .
Read more >Can't get Laravel Mix to work - Frustration LIMIT reached
I got an error when running npm run dev that UIKIT is missing and not in the node_modules ... Module build failed: Error:...
Read more >Laravel mix copy `no such file or directory` - Reddit
I have a standalone installation of laravel mix for a shopify project. When using the copy method I get an [Error: ENOENT: no...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
since the public path is currently used straight in a regex, it’s the
.
that was causing errors for me. I was able to get around it for now by callingpath.resolve()
on the relative path.setPublicPath('public')
may help you while dockerization with multi-stage builds, because mix will not set it ifartisan
file doesn’t exist.