Error while compiling: TypeError: t(...).isPlaceholder is not a function
Hi, I am getting following error after running yarn docz:dev
Failed to compile.
./.docz/app/index.jsx
TypeError: t(...).isPlaceholder is not a function
=============
at Array.reduce (
I am using React 16.7.0
here is my package.json config
"devDependencies": {
"css-loader": "^2.1.0",
"docz": "^0.13.7",
"docz-theme-default": "^0.13.7",
"style-loader": "^0.23.1"
}
Plz help.
Failed to compile.
./.docz/app/index.jsxTypeError: t(...).isPlaceholder is not a function
at Array.reduce ()
Is there any more information associated with this error, like the entire stack trace, that you could share in this issue? I am not sure how to reproduce the issue currently.
I also have this issue
I've encountered the same issue, here's the log from the terminal:
Failed to compile.
./.docz/app/index.jsx
TypeError: t(...).isPlaceholder is not a function
and the stack trace from browser:
Uncaught Error: Module build failed (from ./node_modules/docz-core/node_modules/babel-loader/lib/index.js):
TypeError: t(...).isPlaceholder is not a function
at placeholderVisitorHandler (/Users/default/dev/docz-project/node_modules/@babel/core/node_modules/@babel/template/lib/parse.js:81:11)
at traverseSimpleImpl (/Users/default/dev/docz-project/node_modules/@babel/core/node_modules/@babel/types/lib/traverse/traverse.js:27:14)
at Object.traverse (/Users/default/dev/docz-project/node_modules/@babel/core/node_modules/@babel/types/lib/traverse/traverse.js:21:3)
at parseAndBuildMetadata (/Users/default/dev/docz-project/node_modules/@babel/core/node_modules/@babel/template/lib/parse.js:65:7)
at arg (/Users/default/dev/docz-project/node_modules/@babel/core/node_modules/@babel/template/lib/string.js:21:50)
at arg (/Users/default/dev/docz-project/node_modules/@babel/core/node_modules/@babel/template/lib/builder.js:77:14)
at convertFunctionParams (/Users/default/dev/docz-project/node_modules/@babel/plugin-transform-parameters/lib/params.js:128:23)
at PluginPass.Function (/Users/default/dev/docz-project/node_modules/@babel/plugin-transform-parameters/lib/index.js:38:53)
at newFn (/Users/default/dev/docz-project/node_modules/docz-core/node_modules/@babel/traverse/lib/visitors.js:193:21)
at NodePath._call (/Users/default/dev/docz-project/node_modules/docz-core/node_modules/@babel/traverse/lib/path/context.js:53:20)
at NodePath.call (/Users/default/dev/docz-project/node_modules/docz-core/node_modules/@babel/traverse/lib/path/context.js:40:17)
at NodePath.visit (/Users/default/dev/docz-project/node_modules/docz-core/node_modules/@babel/traverse/lib/path/context.js:88:12)
at TraversalContext.visitQueue (/Users/default/dev/docz-project/node_modules/docz-core/node_modules/@babel/traverse/lib/context.js:118:16)
at TraversalContext.visitSingle (/Users/default/dev/docz-project/node_modules/docz-core/node_modules/@babel/traverse/lib/context.js:90:19)
at TraversalContext.visit (/Users/default/dev/docz-project/node_modules/docz-core/node_modules/@babel/traverse/lib/context.js:146:19)
at Function.traverse.node (/Users/default/dev/docz-project/node_modules/docz-core/node_modules/@babel/traverse/lib/index.js:94:17)
=============
at Object.<anonymous> (/Users/default/dev/docz-project/node_modules/@babel/plugin-transform-parameters/lib/params.js:30:48)
at Module._compile (internal/modules/cjs/loader.js:736:30)
at Module._compile (/Users/default/dev/docz-project/node_modules/pirates/lib/index.js:83:24)
at Module._extensions..js (internal/modules/cjs/loader.js:747:10)
at Object.newLoader [as .js] (/Users/default/dev/docz-project/node_modules/pirates/lib/index.js:88:7)
at Module.load (internal/modules/cjs/loader.js:628:32)
at tryModuleLoad (internal/modules/cjs/loader.js:568:12)
at Function.Module._load (internal/modules/cjs/loader.js:560:3)
at Module.require (internal/modules/cjs/loader.js:665:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/Users/default/dev/docz-project/node_modules/@babel/plugin-transform-parameters/lib/index.js:18:38)
at Module._compile (internal/modules/cjs/loader.js:736:30)
at Module._compile (/Users/default/dev/docz-project/node_modules/pirates/lib/index.js:83:24)
at Module._extensions..js (internal/modules/cjs/loader.js:747:10)
at eval (webpack-internal:///./.docz/app/index.jsx:1:7)
at Object../.docz/app/index.jsx (http://localhost:3000/static/js/app.js:874:1)
at __webpack_require__ (http://localhost:3000/static/js/app.js:786:30)
at fn (http://localhost:3000/static/js/app.js:151:20)
at Object.0 (http://localhost:3000/static/js/app.js:899:18)
at __webpack_require__ (http://localhost:3000/static/js/app.js:786:30)
at checkDeferredModules (http://localhost:3000/static/js/app.js:46:23)
at http://localhost:3000/static/js/app.js:862:18
at http://localhost:3000/static/js/app.js:865:10
Ok, an update here: removing node_modules and installing it again helped me
any news here? even though removing node_modules helps it's still awkward to do it regularly
For me removing node_modules didn't help
What version are you on @malyborky and @user1736?
@debabrata100 I see that you are using 0.13.7, have you tried upgrading to v1 och v2?
@jesperorb it's 1.2.0
Any update on this issue?
Any chance you can update to v2 ? Happy to help if you encounter issues when updating.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
any news here? even though removing
node_moduleshelps it's still awkward to do it regularly