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

docpad init runs across some problems #631

Closed
greduan opened this issue Sep 4, 2013 · 3 comments
Closed

docpad init runs across some problems #631

greduan opened this issue Sep 4, 2013 · 3 comments

Comments

@greduan
Copy link
Contributor

greduan commented Sep 4, 2013

I noticed that running docpad init will run it with the global version first, and then when it gets to the local version it'll try to run it again but run across problems because the folders already exist.

What could be a possible solution for this?

You can observe this behavior in this video: http://youtu.be/KkHHR0MKLx0?t=6m15s

Again, I'm not sure if that's really what's happening, but it's the only thing I can come up with.

@greduan
Copy link
Contributor Author

greduan commented Sep 6, 2013

@balupton Here's the CLI output:

eduan@eduan-mac-mini2011:~/localhost/test $ docpad init                                                                                                                                 14:32
info: Welcome to DocPad v6.51.6
info: Contribute: http://docpad.org/docs/contribute
info: Plugins:
info: Environment: development
info: Installing the No Skeleton skeleton into /Users/eduan/localhost/test
This can take a moment...
info: npm install
npm WARN package.json no-skeleton.docpad@0.1.0 No repository field.
npm http GET https://registry.npmjs.org/docpad
npm http 304 https://registry.npmjs.org/docpad
npm http GET https://registry.npmjs.org/caterpillar-human
npm http GET https://registry.npmjs.org/caterpillar
npm http GET https://registry.npmjs.org/bal-util
npm http GET https://registry.npmjs.org/extendr
npm http GET https://registry.npmjs.org/eachr
npm http GET https://registry.npmjs.org/caterpillar-filter
npm http GET https://registry.npmjs.org/event-emitter-grouped
npm http GET https://registry.npmjs.org/envfile
npm http GET https://registry.npmjs.org/cson
npm http GET https://registry.npmjs.org/extract-opts
npm http GET https://registry.npmjs.org/getmac
npm http GET https://registry.npmjs.org/lazy-require
npm http GET https://registry.npmjs.org/jschardet
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/safefs
npm http GET https://registry.npmjs.org/progressbar
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/safeps
npm http GET https://registry.npmjs.org/taskgroup
npm http GET https://registry.npmjs.org/typechecker
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/query-engine
npm http GET https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/backbone/1.0.0
npm http GET https://registry.npmjs.org/superagent
npm http GET https://registry.npmjs.org/yamljs
npm http GET https://registry.npmjs.org/growl
npm http GET https://registry.npmjs.org/ambi
npm http GET https://registry.npmjs.org/watchr
npm http GET https://registry.npmjs.org/promptly
npm http 304 https://registry.npmjs.org/caterpillar-human
npm http 304 https://registry.npmjs.org/bal-util
npm http 304 https://registry.npmjs.org/eachr
npm http 304 https://registry.npmjs.org/caterpillar
npm http 304 https://registry.npmjs.org/extendr
npm http 304 https://registry.npmjs.org/caterpillar-filter
npm http 304 https://registry.npmjs.org/event-emitter-grouped
npm http 304 https://registry.npmjs.org/envfile
npm http 304 https://registry.npmjs.org/cson
npm http 304 https://registry.npmjs.org/extract-opts
npm http 304 https://registry.npmjs.org/getmac
npm http 304 https://registry.npmjs.org/lazy-require
npm http 304 https://registry.npmjs.org/jschardet
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/safefs
npm http 304 https://registry.npmjs.org/progressbar
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/safeps
npm http 304 https://registry.npmjs.org/taskgroup
npm http 304 https://registry.npmjs.org/typechecker
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/query-engine
npm http 304 https://registry.npmjs.org/semver
npm http 304 https://registry.npmjs.org/backbone/1.0.0
npm http 304 https://registry.npmjs.org/superagent
npm http 304 https://registry.npmjs.org/yamljs
npm http 304 https://registry.npmjs.org/growl
npm http 304 https://registry.npmjs.org/ambi
npm http 304 https://registry.npmjs.org/watchr
npm http 304 https://registry.npmjs.org/promptly
npm http 200 https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/joe
npm http GET https://registry.npmjs.org/joe-reporter-console
npm http GET https://registry.npmjs.org/progress/0.1.0
npm http GET https://registry.npmjs.org/ansistyles
npm http GET https://registry.npmjs.org/ansicolors
npm http GET https://registry.npmjs.org/readable-stream
npm http GET https://registry.npmjs.org/js2coffee
npm http GET https://registry.npmjs.org/requirefresh
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/read
npm http GET https://registry.npmjs.org/eventemitter2
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/connect/2.8.8
npm http GET https://registry.npmjs.org/commander/1.2.0
npm http GET https://registry.npmjs.org/mkdirp/0.3.5
npm http GET https://registry.npmjs.org/range-parser/0.0.4
npm http GET https://registry.npmjs.org/cookie/0.1.0
npm http GET https://registry.npmjs.org/methods/0.0.1
npm http GET https://registry.npmjs.org/buffer-crc32/0.2.1
npm http GET https://registry.npmjs.org/fresh/0.2.0
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/send/0.1.4
npm http GET https://registry.npmjs.org/cookie-signature/1.0.1
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/formidable/1.0.14
npm http GET https://registry.npmjs.org/qs/0.6.5
npm http GET https://registry.npmjs.org/mime/1.2.5
npm http GET https://registry.npmjs.org/cookiejar/1.3.0
npm http GET https://registry.npmjs.org/emitter-component/1.0.0
npm http 304 https://registry.npmjs.org/joe
npm http 304 https://registry.npmjs.org/joe-reporter-console
npm http 304 https://registry.npmjs.org/progress/0.1.0
npm http 304 https://registry.npmjs.org/ansicolors
npm http 304 https://registry.npmjs.org/ansistyles
npm http 304 https://registry.npmjs.org/readable-stream
npm http 304 https://registry.npmjs.org/js2coffee
npm http 304 https://registry.npmjs.org/requirefresh
npm http 304 https://registry.npmjs.org/coffee-script
npm http 304 https://registry.npmjs.org/read
npm http 304 https://registry.npmjs.org/eventemitter2
npm http 304 https://registry.npmjs.org/connect/2.8.8
npm http 304 https://registry.npmjs.org/commander/1.2.0
npm http 304 https://registry.npmjs.org/mkdirp/0.3.5
npm http 304 https://registry.npmjs.org/range-parser/0.0.4
npm http 304 https://registry.npmjs.org/cookie/0.1.0
npm http 304 https://registry.npmjs.org/methods/0.0.1
npm http 304 https://registry.npmjs.org/buffer-crc32/0.2.1
npm http GET https://registry.npmjs.org/cli-color
npm http 304 https://registry.npmjs.org/fresh/0.2.0
npm http 200 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/send/0.1.4
npm http 304 https://registry.npmjs.org/cookie-signature/1.0.1
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/formidable/1.0.14
npm http 304 https://registry.npmjs.org/qs/0.6.5
npm http 304 https://registry.npmjs.org/mime/1.2.5
npm http 304 https://registry.npmjs.org/cookiejar/1.3.0
npm http 304 https://registry.npmjs.org/emitter-component/1.0.0
npm http 304 https://registry.npmjs.org/cli-color
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/argparse
npm http GET https://registry.npmjs.org/mute-stream
npm http GET https://registry.npmjs.org/keypress
npm http 304 https://registry.npmjs.org/argparse
npm http GET https://registry.npmjs.org/es5-ext
npm http GET https://registry.npmjs.org/memoizee
npm http GET https://registry.npmjs.org/file
npm http GET https://registry.npmjs.org/bytes/0.2.0
npm http GET https://registry.npmjs.org/pause/0.0.1
npm http GET https://registry.npmjs.org/uid2/0.0.2
npm http 304 https://registry.npmjs.org/mute-stream
npm http 304 https://registry.npmjs.org/file
npm http 304 https://registry.npmjs.org/keypress
npm http 304 https://registry.npmjs.org/bytes/0.2.0
npm http 304 https://registry.npmjs.org/pause/0.0.1
npm http 304 https://registry.npmjs.org/uid2/0.0.2
npm http 304 https://registry.npmjs.org/memoizee
npm http 304 https://registry.npmjs.org/es5-ext
npm http GET https://registry.npmjs.org/event-emitter
npm http GET https://registry.npmjs.org/next-tick
npm http 200 https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/underscore.string
npm http 304 https://registry.npmjs.org/event-emitter
npm http 304 https://registry.npmjs.org/next-tick
npm http 304 https://registry.npmjs.org/underscore.string
npm http 304 https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/sigmund
docpad@6.51.6 node_modules/docpad
├── lazy-require@1.0.0
├── typechecker@2.0.1
├── ambi@2.1.1
├── eachr@2.0.2
├── growl@1.7.0
├── extendr@2.1.0
├── safefs@3.0.3
├── extract-opts@2.2.0
├── caterpillar-filter@2.0.1
├── envfile@1.0.0
├── commander@2.0.0
├── taskgroup@3.2.0
├── safeps@2.2.7
├── query-engine@1.5.2
├── mime@1.2.11
├── semver@2.1.0
├── progressbar@1.0.2 (progress@0.1.0)
├── caterpillar-human@2.1.0 (ansistyles@0.1.1, ansicolors@0.2.1)
├── event-emitter-grouped@2.3.0 (ambi@2.0.0, taskgroup@3.1.2)
├── bal-util@2.3.0 (ambi@2.0.0, extendr@2.0.1, taskgroup@3.1.2)
├── watchr@2.4.3 (extendr@2.0.1, bal-util@2.0.5, taskgroup@3.1.2)
├── backbone@1.0.0 (underscore@1.5.1)
├── caterpillar@2.0.4 (readable-stream@1.0.17)
├── jschardet@1.0.2
├── superagent@0.15.4 (methods@0.0.1, qs@0.6.5, cookiejar@1.3.0, emitter-component@1.0.0, mime@1.2.5, debug@0.7.2, formidable@1.0.14)
├── lodash@1.3.1
├── promptly@0.2.0 (read@1.0.5)
├── cson@1.4.4 (requirefresh@1.1.2, coffee-script@1.6.3, js2coffee@0.1.4)
├── express@3.3.8 (methods@0.0.1, range-parser@0.0.4, cookie-signature@1.0.1, fresh@0.2.0, buffer-crc32@0.2.1, cookie@0.1.0, send@0.1.4, debug@0.7.2, mkdirp@0.3.5, commander@1.2.0, connect@2.8.8)
├── getmac@1.0.5 (joe@1.3.0, joe-reporter-console@1.2.1)
└── yamljs@0.1.4 (argparse@0.1.15, glob@3.1.21)
notice: Shutting down the global DocPad instance, and starting the local one
info: Welcome to DocPad v6.51.6, local installation
info: Contribute: http://docpad.org/docs/contribute
info: Plugins:
info: Environment: development
error: Something went wrong with the action
error: An error occured:
Error: Didn't place the skeleton as the desired structure already exists
    at /Users/eduan/localhost/test/node_modules/docpad/out/lib/docpad.js:3953:15
    at /Users/eduan/localhost/test/node_modules/docpad/node_modules/safefs/out/lib/safefs.js:185:16
    at Object.cb [as oncomplete] (fs.js:168:19)

@balupton
Copy link
Member

balupton commented Sep 7, 2013

This was actually my fault entirely. The starting of the local docpad instance was in installSkeleton rather than in the run action. Fixed this up with the just released v6.52.1

balupton added a commit that referenced this issue Sep 7, 2013
- v6.52.1 September 8, 2013
	- Fixed "structure already exists" errors after successful `docpad
init` and `docpad skeleton` completion
		- Thanks to [Eduán Lávaque](https://github.com/Greduan) for [issue
#631](#631)
	- Better errors when a skeleton fails via the global `docpad run`
@greduan
Copy link
Contributor Author

greduan commented Sep 7, 2013

Works great now. :)

@greduan greduan closed this as completed Sep 7, 2013
balupton added a commit that referenced this issue Oct 23, 2013
- v6.52.1 September 8, 2013
	- Fixed "structure already exists" errors after successful `docpad
init` and `docpad skeleton` completion
		- Thanks to [Eduán Lávaque](https://github.com/Greduan) for [issue
#631](#631)
	- Better errors when a skeleton fails via the global `docpad run`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants