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

no docz:dev and error 'no space left on device' #274

Closed
mizi-lin opened this issue Aug 31, 2018 · 8 comments
Closed

no docz:dev and error 'no space left on device' #274

mizi-lin opened this issue Aug 31, 2018 · 8 comments
Labels
bug Something isn't working

Comments

@mizi-lin
Copy link

Bug Report

image

Environment

@mizi-lin
Copy link
Author

my package.json

 "dependencies": {
        "@babel/core": "^7.0.0",
        "antd": "3.8.2",
        "autobind-decorator": "2.1.0",
        "axios": "0.18.0",
        "classnames": "2.2.6",
        "docz": "0.10.3",
        "docz-plugin-css": "0.10.3",
        "downloadjs": "1.4.7",
        "dva": "2.4.0",
        "echarts": "4.1.0",
        "echarts-wordcloud": "1.1.3",
        "hanabi": "0.4.0",
        "lodash": "4.17.10",
        "mobx": "4.3.1",
        "mobx-react": "5.2.5",
        "mzmu": "1.8.18",
        "ramda": "0.25.0",
        "react-immutable-render-mixin": "0.9.7",
        "react-jsx-parser": "1.5.1",
        "simple-line-icons": "2.4.1",
        "typescript": "2.9.2",
        "umi": "2.0.0-beta.16"
    },
    "devDependencies": {
        "@types/echarts": "0.0.12",
        "@types/lodash": "4.14.116",
        "@types/node": "9.6.28",
        "@types/react": "16.4.11",
        "babel-plugin-module-resolver": "3.1.1",
        "ts-jest-babel-7": "22.0.7",
        "typedoc": "0.11.1",
        "umi-plugin-dva": "0.9.1"
    }

@mizi-lin
Copy link
Author

but theme same project in my macbook can run docz:dev && docz:build

@mizi-lin mizi-lin changed the title no docz:dev && no docz:build no docz:dev and error 'no space left on device' Aug 31, 2018
@nicholasess
Copy link
Contributor

@amily4555 It isn`t error from docz, look for npm ERR! No Space left on device

@mizi-lin
Copy link
Author

mizi-lin commented Sep 5, 2018

3q,

I will update npm to the latest version to see if there is still this problem.

@stephenwf
Copy link
Contributor

stephenwf commented Sep 6, 2018

We are having a similar issue during a Netlify deployment when we added too many packages from NPM. The ENOSPC may not be because of a lack of disk space, but a limit being reached on the files being watched. When docz builds a production build, something (webpack perhaps) is using chokidar to watch node_modules.

@stephenwf
Copy link
Contributor

stephenwf commented Sep 6, 2018

An update to our issue. There is a chokidar watcher set up to watch for changes to .mdx files, which if you do not configure the path yourself will default to **/*.mdx. This causes chokidar to watch.. a lot of files, including node_modules/.cache and .docz/cache which, during a production build, change often on a dry start.

If you ran the command enough times, it would eventually work, once the cache had warmed up. (Different machines, different results. We had this issue on Netlify)

The default is set here:
https://github.com/pedronauck/docz/blob/035ec02390459ba70ebd63c8477d001426a1fb8b/packages/docz-core/src/commands/args.ts#L97

If the default was prefixed with config.base property, it would limit the scope of this watcher a lot. Our solution in the mean time was to manually, in our doczrc.js set the files to a new pattern:

export default {
  src: './src/components',
  files: 'src/components/**/*.mdx',
}

Which resolved our issues.

@pedronauck
Copy link
Member

That's a really good point, I'll look into this to try to avoid this type of unnecessary watch! Thanks to the tip @stephenwf 🙏

@pedronauck pedronauck added the bug Something isn't working label Sep 6, 2018
@pedronauck
Copy link
Member

Fixed in the new v0.11.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants