question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New standalone install fails on npm run hot

See original GitHub issue
  • Laravel Mix Version: 0.9.2
  • Node Version: 6.7.0
  • NPM Version 3.10.9:
  • OS: mac OSX 10.12.5 Beta

Description:

I just tried to make a new installation according to the docs:

mkdir my-app && cd my-app
npm init -y
npm install laravel-mix --save-dev
cp -r node_modules/laravel-mix/setup/** ./

created the files src/app.scss and src/app.js and added the scripts to the package.json.

now 3 of the scripts work fine, except for the npm run hot where I get this error:

> xx@1.0.0 hot /Developer/xx
> cross-env NODE_ENV=development webpack-dev-server --inline --hot

fs.js:640
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: EACCES: permission denied, open '/hot'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Object.fs.writeFileSync (fs.js:1333:33)
    at File.write (/Developer/xx/node_modules/laravel-mix/src/File.js:88:12)
    at Mix.detectHotReloading (/Developer/xx/node_modules/laravel-mix/src/Mix.js:104:18)
    at Mix.initialize (/Developer/xx/node_modules/laravel-mix/src/Mix.js:42:14)
    at Object.<anonymous> (/Developer/xx/webpack.config.js:18:5)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at requireConfig (/Developer/xx/node_modules/webpack/bin/convert-argv.js:96:18)
    at /Developer/xx/node_modules/webpack/bin/convert-argv.js:109:17

My folder looks like this:

.
β”œβ”€β”€ README.md
β”œβ”€β”€ dist
β”‚Β Β  β”œβ”€β”€ app.css
β”‚Β Β  β”œβ”€β”€ app.js
β”‚Β Β  └── index.html
β”œβ”€β”€ mix-manifest.json
β”œβ”€β”€ node_modules (and all installed dependencies)
β”œβ”€β”€ package.json
β”œβ”€β”€ src
β”‚Β Β  β”œβ”€β”€ app.js
β”‚Β Β  └── app.scss
β”œβ”€β”€ webpack.config.js
└── webpack.mix.js

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

11reactions
JeffreyWaycommented, Mar 30, 2017

Can you add mix.setPublicPath('dist') at the top of your webpack.mix.js file and then try again?

3reactions
Vasiliy-Bondarenkocommented, Oct 17, 2017

@StefanNeuser

// run versioning on production only
if (mix.inProduction()) {
    mix.version();
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

New standalone install fails on npm run hot #645 - GitHub
It seems like file permission issue. Where you have placed your project ? I could not understand this path /Developer/xx. Can you dump...
Read more >
npm run watch fails to run, but gives no error - Stack Overflow
I am working on a project with a couple of others using laravel and react/material ui. Something happened to my npm (someone tried...
Read more >
Installation | webpack
To install the latest release or a specific version, run one of the following commands: npm install --save-dev webpack # or specific version...
Read more >
npm run watch error, not working in laravel - Laracasts
Hi i'm using laravel 5.4, when i run npm run watch or npm run dev ... Make sure you have the latest version...
Read more >
swagger-editor - npm
Swagger Editor lets you edit OpenAPI API definitions in YAML inside your browser and to preview documentations in real time. Valid Swagger JSONΒ ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found