Error in index.js
kittykatattack opened this issue · comments
kittykatattack commented
Hello,
With a fresh install of elm-webpack-starter, I'm getting the following errors when I run npm start
:
[78] ./src/static/index.js 442 bytes {0} [built] [1 error]
And
ERROR in ./src/elm/Main.elm
Module build failed: Error: Compiler process exited with error Compilation failed
elm-make: elm-stuff/build-artifacts: createDirectory: permission denied (Permission denied)
at ChildProcess.<anonymous> (/Users/rvanderspuy/newspaper_interviw_18/node_modules/node-elm-compiler/index.js:257:27)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Socket.<anonymous> (internal/child_process.js:334:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:498:12)
@ ./src/static/index.js 7:10-34
I'm on OSX (El Capitan) running node v.6.9.2 and npm v.3.10.9
Can anyone suggest what the problem might be?
kittykatattack commented
Oh, it was a permissions problem!
I needed to use:
sudo npm start
... but I'm not sure why I needed sudo
.
Does anyone know?
Oleksandr commented
sudo chown -R username:groupname elm-stuff
npm run start