question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error on run docz dev command

See original GitHub issue

Bug Report

On run the docz dev command return this error on terminal:

captura de tela 2018-08-14 as 15 02 52

 ERROR  Failed to compile with 1 errors                                                                                    15:02:50

 error  in ./.docz/app/index.jsx

Module build failed (from ./node_modules/happypack/loader.js):
Error: Plugin/Preset files are not allowed to export objects, only functions. In /private/tmp/arv-ui-2/node_modules/babel-preset-react/lib/index.js
    at createDescriptor (/private/tmp/arv-ui-2/node_modules/@babel/core/lib/config/config-descriptors.js:138:11)
    at items.map (/private/tmp/arv-ui-2/node_modules/@babel/core/lib/config/config-descriptors.js:69:50)
    at Array.map (<anonymous>)
    at createDescriptors (/private/tmp/arv-ui-2/node_modules/@babel/core/lib/config/config-descriptors.js:69:29)
    at createPresetDescriptors (/private/tmp/arv-ui-2/node_modules/@babel/core/lib/config/config-descriptors.js:61:10)
    at passPerPreset (/private/tmp/arv-ui-2/node_modules/@babel/core/lib/config/config-descriptors.js:53:96)
    at cachedFunction (/private/tmp/arv-ui-2/node_modules/@babel/core/lib/config/caching.js:32:19)
    at presets.presets (/private/tmp/arv-ui-2/node_modules/@babel/core/lib/config/config-descriptors.js:25:84)
    at mergeChainOpts (/private/tmp/arv-ui-2/node_modules/@babel/core/lib/config/config-chain.js:303:26)
    at /private/tmp/arv-ui-2/node_modules/@babel/core/lib/config/config-chain.js:266:7
    at buildRootChain (/private/tmp/arv-ui-2/node_modules/@babel/core/lib/config/config-chain.js:56:29)
    at loadPrivatePartialConfig (/private/tmp/arv-ui-2/node_modules/@babel/core/lib/config/partial.js:55:55)
    at Object.loadPartialConfig (/private/tmp/arv-ui-2/node_modules/@babel/core/lib/config/partial.js:80:18)
    at Object.<anonymous> (/private/tmp/arv-ui-2/node_modules/docz-core/node_modules/babel-loader/lib/index.js:82:26)
    at Generator.next (<anonymous>)
    at step (/private/tmp/arv-ui-2/node_modules/docz-core/node_modules/babel-loader/lib/index.js:3:221)

 @ multi ./node_modules/docz-core/node_modules/babel-polyfill/lib/index.js ./.docz/app/index.jsx

Package.json

{
  "name": "arv-ui",
  "version": "0.0.1",
  "author": "Raí Siqueira <rai93siqueira@gmail.com>",
  "repository": "raisiqueira/arv-ui",
  "keywords": [
    "react",
    "react-dom"
  ],
  "license": "MIT",
  "main": "dist/index.js",
  "source": "src/index.js",
  "files": [
    "dist"
  ],
  "scripts": {
    "start": "NODE_ENV=development babel -w ./src --out-dir dist",
    "build": "NODE_ENV=production babel ./src --out-dir dist",
    "test": "jest",
    "test:coverage": "jest --coverage",
    "test:watch": "jest --watch",
    "test:lint": "eslint . --ignore-path .gitignore",
    "prepare": "npm run build",
    "deploy": "np",
    "docz:dev": "docz dev",
    "docz:build": "docz build"
  },
  "dependencies": {
    "path-to-regexp": "^2.2.1",
    "prop-types": "^15.6.2",
    "react-select": "^2.0.0",
    "reakit": "^0.14.0"
  },
  "peerDependencies": {
    "react": ">=15",
    "react-dom": ">=15"
  },
  "devDependencies": {
    "babel-cli": "^6.26.0",
    "babel-core": "^6.26.3",
    "babel-loader": "^7.1.5",
    "babel-plugin-transform-class-properties": "^6.24.1",
    "babel-preset-env": "^1.7.0",
    "babel-preset-react": "^6.24.1",
    "babel-runtime": "^6.26.0",
    "docz": "^0.10.2",
    "jest": "^23.5.0",
    "np": "^3.0.4",
    "react": "^16.4.2",
    "react-dom": "^16.4.2"
  },
  "jest": {
    "collectCoverage": true,
    "moduleFileExtensions": [
      "js",
      "jsx"
    ],
    "moduleDirectories": [
      "node_modules",
      "packages"
    ]
  },
  "pre-push": [
    "test"
  ]
}

Environment

  • OS: OSX 10.13.4
  • Node/npm version: Node 9.4.0/npm 6.2.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
nicholasesscommented, Aug 24, 2018

@pedronauck i wil reopen, because other people has the same problem and not find a issue to see some solutions.

1reaction
mahenrique94commented, Aug 24, 2018

I just upgrade my babel version with babel-upgrade and remove react-app from my .babelrc file in presets, and Docz became workz \o/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error on run docz dev command · Issue #224 - GitHub
Bug Report On run the docz dev command return this error on terminal: ERROR Failed to compile with 1 errors 15:02:50 error in...
Read more >
Project Configuration - Docz
Specify the host to use for the dev server. port. Type: number; Alias: p; Default: process.env.DOCZ_PORT || 3000.
Read more >
Troubleshooting - React Native
If you encounter an error such as npm WARN locking Error: EACCES while using the React Native CLI, try running the following:.
Read more >
Common errors | npm Docs
Some strange issues can be resolved by simply running npm cache clean and trying again. ... You can do this from the command...
Read more >
0 - Stack Overflow
Build Failed: error Command failed with exit code 1. info Visit ... It wokrs, but when I try to run the app from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found