Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies installed can be different than what is in donejs-cli #590

Closed
matthewp opened this issue Mar 24, 2016 · 10 comments
Closed

Dependencies installed can be different than what is in donejs-cli #590

matthewp opened this issue Mar 24, 2016 · 10 comments
Assignees
Labels

Comments

@matthewp
Copy link
Contributor

This was reported in gitter:

https://gitter.im/donejs/donejs?at=56f44b78d39de41b495d87b2

What's interesting is that most of the package.json is up-to-date, it's just the dependency list that is not.

@matthewp matthewp self-assigned this Mar 24, 2016
@matthewp
Copy link
Contributor Author

Hey @tracer99, in the folder where you are initing from, do you have a node_modules/ folder, and does that node_modules folder have a donejs-cli subfolder?

@justinbmeyer
Copy link
Contributor

I once found an error because the parent folder had a node_modules so parts of the CLI didn't work.

@tracer99
Copy link

I ran init in my home dir. I don't have a node_modules dir there.
Of note is that the directory I initialized the project already existed.
That directory did not have a node_modules dir or anything that would have conflicted. It was a boilerplate git project setup by our system.

@matthewp
Copy link
Contributor Author

@tracer99 Did the folder have a package.json by any chance?

@tracer99
Copy link

Nope.

@tracer99
Copy link

I re-did an init on a clean install (not into an existing dir)
Just to be safe:

node -v
v0.12.12

npm cache clear

donejs -V
0.8.0

This is the package.json that was generated https://gist.github.com/tracer99/85d10956dc20a170fa55

@matthewp
Copy link
Contributor Author

Anything in the existing directory at all?

@tracer99
Copy link

We have a boilerplate new git project init on our git server. This is what it creates and what the dir had:

.gitignore
Makefile
README
bin/README
docs/README
tests/README

@matthewp matthewp removed their assignment Dec 15, 2016
@phillipskevin phillipskevin self-assigned this Feb 9, 2017
@phillipskevin
Copy link
Contributor

So you can see in that package.json that donejs-cli@0.7.0 was installed, so this is the 0.7.0 dependencies. I'm going to investigate how it's possible that an older cli was installed.

@phillipskevin
Copy link
Contributor

Ok, I was able to reproduce this issue.

Prior to 0.9, this issue could occur if you had a package.json in any parent directory of where you're initializing a new app.

$ donejs -V
0.7.2
$ donejs init
...
$ cat package.json | grep donejs-cli
"donejs-cli": "^0.7.0"
$ mkdir -p foo/bar/baz/zero-eight-app
$ cd foo/bar/baz/zero-eight-app/
$ npm i -g donejs@0.8
$ donejs init
...
$ cat package.json | grep donejs-cli
    "donejs-cli": "^0.7.0",
$ mkdir ../zero-nine-app
$ cd ../zero-nine-app
$ npm i -g donejs@0.9
$ donejs init
...
$ cat package.json | grep donejs-cli
"donejs-cli": "^0.9.4",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants