create-elm-app as a local dependency
Closed this issue · 4 comments
shuhei commented
Is this a bug report?
No. Probably create-elm-app
as a project local dependency is not supported anymore, but the use case can be supported with a one line change. I'll make a pull request following this issue.
Environment
node -v
: v8.11.2npm -v
: 6.4.1yarn --version
(if you use Yarn): I don't use itnpm ls create-elm-app -g
(if you haven’t ejected): create-elm-app@2.0.3 (same version indevDependencies
of the project)
Then, specify:
- Operating system: macOS High Sierra 10.13.6
- Browser and version (if relevant): not relevant
Steps to Reproduce
(Write your steps here:)
- Create an app with
create-elm-app foo
cd foo
npm i -D create-elm-app
- Add
elm-app start
toscripts
->start
inpackage.json
npm start
Expected Behavior
The application starts without an error.
Actual Behavior
I got the following error.
Starting the development server...
Running /Users/shuhei/work/elm/create-elm-app-test/node_modules/create-elm-app/node_modules/.bin/elm make /Users/shuhei/work/elm/create-elm-app-test/src/Main.elm --debug --output /var/folders/zj/lxpw_yhd1411_d7p078bxznm0000gn/T/11888-5281-1dcflm2.xk4c.js
/Users/shuhei/work/elm/create-elm-app-test/node_modules/node-elm-compiler/index.js:103
.on('error', function(err) { throw(err); });
^
Error: spawn /Users/shuhei/work/elm/create-elm-app-test/node_modules/create-elm-app/node_modules/.bin/elm ENOENT
at _errnoException (util.js:992:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @shuhei/create-elm-app-test@1.0.0 start: `elm-app start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @shuhei/create-elm-app-test@1.0.0 start 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/shuhei/.npm/_logs/2018-09-08T11_56_14_860Z-debug.log
Reproducible Demo
(Paste the link to an example project and exact instructions to reproduce the issue.)
shuhei commented
Sorry, I changed my mind. I'll just use this as a global package.
shuhei commented
I changed my mind again. I'll leave it to your decision.
halfzebra commented
Hi @shuhei!
Thanks for the report and for the PR!
I will merge it as I think this use-case should be supported.
shuhei commented
Hi @halfzebra! Thanks for merging :D