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

Docpress serve trips up on symlinked folder. #230

Open
trusktr opened this issue Jan 11, 2018 · 3 comments
Open

Docpress serve trips up on symlinked folder. #230

trusktr opened this issue Jan 11, 2018 · 3 comments

Comments

@trusktr
Copy link

trusktr commented Jan 11, 2018

I've got some symlinked folders (that have nothing to do with the docs) which causes docpress to have some trouble:

  Docpress
  starting development - ^C to exit

   err ✗    first build
     ···    livereload
    ✓ on    livereload
    ✓ on    http://localhost:3000
            Starting up...
            Running
  ✗ Failed to read the file at: /home/trusktr/Downloads/src/trusktr+infamous/website/.meteor/local/dev_bundle

EISDIR: illegal operation on a directory, read

    EISDIR: illegal operation on a directory, read

This causes the serve mode not to work. Looks like symlinks to folders need to be ignored.

This indicates that docpress is watching files completely unrelated to the docs, which is probably likely to cause #229.

@trusktr
Copy link
Author

trusktr commented Jan 11, 2018

That file, .meteor/local/dev_bundle, is symlinked to a folder in ~/.meteor outside of the project.

@trusktr
Copy link
Author

trusktr commented Jan 11, 2018

Crap, this is failing with docpress build as well:

> docpress build

/home/trusktr/Downloads/src/trusktr+infamous/node_modules/docpress/bin/docpress:16
      if (err) throw err
               ^

Error: Failed to read the file at: /home/trusktr/Downloads/src/trusktr+infamous/website/.meteor/local/dev_bundle

EISDIR: illegal operation on a directory, read
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! infamous@18.0.2 docs-build: `docpress build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the infamous@18.0.2 docs-build 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!     /home/trusktr/.npm/_logs/2018-01-11T00_57_17_631Z-debug.log

and here's the contents of the debug.log:

trusktr+infamous git:docs ❯ cat /home/trusktr/.npm/_logs/2018-01-11T00_57_17_631Z-debug.log                                                        ✹
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run',
1 verbose cli   'docs-build' ]
2 info using npm@5.6.0
3 info using node@v8.5.0
4 verbose run-script [ 'predocs-build', 'docs-build', 'postdocs-build' ]
5 info lifecycle infamous@18.0.2~predocs-build: infamous@18.0.2
6 info lifecycle infamous@18.0.2~docs-build: infamous@18.0.2
7 verbose lifecycle infamous@18.0.2~docs-build: unsafe-perm in lifecycle true
8 verbose lifecycle infamous@18.0.2~docs-build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/trusktr/Downloads
/src/trusktr+infamous/node_modules/.bin:/home/linuxbrew/.linuxbrew/bin:/home/trusktr/go/bin:/home/linuxbrew/.linuxbrew/bin:/home/trusktr/go/bin:/usr/
local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/trusktr/.local/bin:/home/trusktr/.gem/ruby/1.9.1/bin:/home/trusktr/.gem/ruby/2.2.0/bin:/usr
/local/bin:/home/trusktr/.vim/bundle/fzf/bin:/home/trusktr/.local/bin:/home/trusktr/.gem/ruby/1.9.1/bin:/home/trusktr/.gem/ruby/2.2.0/bin:/usr/local/
bin
9 verbose lifecycle infamous@18.0.2~docs-build: CWD: /home/trusktr/Downloads/src/trusktr+infamous
10 silly lifecycle infamous@18.0.2~docs-build: Args: [ '-c', 'docpress build' ]
11 silly lifecycle infamous@18.0.2~docs-build: Returned: code: 1  signal: null
12 info lifecycle infamous@18.0.2~docs-build: Failed to exec docs-build script
13 verbose stack Error: infamous@18.0.2 docs-build: `docpress build`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at EventEmitter.emit (events.js:213:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at ChildProcess.emit (events.js:213:7)
13 verbose stack     at maybeClose (internal/child_process.js:927:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid infamous@18.0.2
15 verbose cwd /home/trusktr/Downloads/src/trusktr+infamous
16 verbose Linux 3.18.0-16288-g64d05cf80004
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "docs-build"
18 verbose node v8.5.0
19 verbose npm  v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error infamous@18.0.2 docs-build: `docpress build`
22 error Exit status 1
23 error Failed at the infamous@18.0.2 docs-build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@hunternovak
Copy link

I'm having a similar issue:

                                                    
  Docpress                                          
  starting development - ^C to exit                 
                                                    
   err ✗    first build                             
     ···    livereload                              
     ···    http://localhost:3000                   
    ✓ on    livereload                              
            Starting up...                          
                                                    
  ✗ Failed to read the file at: /Users/hunternovak/src/apps/web-react/.git/shallow

ENOENT: no such file or directory, stat '/Users/hunternovak/src/apps/web-react/.git/shallow'  
                                                    
    ENOENT: no such file or directory, stat '/Users/hunternovak/src/apps/web-react/.git/shallow'  
                                                    
(node:73009) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, open '/Users/hunternovak/src/apps/web-react/node_modules/superstatic/lib/middleware/../assets/env.js.template'
(node:73009) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

It looks like metalsmith is actually reading through the entire directory tree instead of just the .md files. The underlying issue may actually run much deeper - see metalsmith/metalsmith#281

I'm running node v8.9.4.

knownasilya pushed a commit to docpress/docpress-core that referenced this issue Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants