You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our company got our own babel preset which is similar to create-react-app preset, we always use it for build and compiling, I have removed the code which make use of that preset, but I found our preset could not work together with babel-plugin-export-metadata
error in ./packages/core/Button/index.js
Module build failed (from ./node_modules/docz-core/node_modules/babel-loader/lib/index.js):
TypeError: @babel/template placeholder "NAME": Property declaration of ExportDefaultDeclaration expected node to be of a type ["FunctionDeclaration","TSDeclareFunction","ClassDeclaration","Expression"] but instead got null
at Object.validate (/Users/chen/projects/github/docz-v1-demo/node_modules/@babel/types/lib/definitions/utils.js:128:13)
at Object.validate (/Users/chen/projects/github/docz-v1-demo/node_modules/@babel/types/lib/validators/validate.js:17:9)
at applyReplacement (/Users/chen/projects/github/docz-v1-demo/node_modules/@babel/template/lib/populate.js:113:9)
at metadata.placeholders.slice.reverse.forEach.placeholder (/Users/chen/projects/github/docz-v1-demo/node_modules/@babel/template/lib/populate.js:42:7)
at Array.forEach (<anonymous>)
at populatePlaceholders (/Users/chen/projects/github/docz-v1-demo/node_modules/@babel/template/lib/populate.js:40:43)
at arg (/Users/chen/projects/github/docz-v1-demo/node_modules/@babel/template/lib/string.js:22:51)
at arg (/Users/chen/projects/github/docz-v1-demo/node_modules/@babel/template/lib/builder.js:77:14)
at renameDefaultAddFileMetaProperties (/Users/chen/projects/github/docz-v1-demo/node_modules/babel-plugin-export-metadata/src/index.js:61:22)
at PluginPass.<anonymous> (/Users/chen/projects/github/docz-v1-demo/node_modules/babel-plugin-export-metadata/src/index.js:98:9)
at newFn (/Users/chen/projects/github/docz-v1-demo/node_modules/@babel/traverse/lib/visitors.js:193:21)
at NodePath._call (/Users/chen/projects/github/docz-v1-demo/node_modules/@babel/traverse/lib/path/context.js:53:20)
at NodePath.call (/Users/chen/projects/github/docz-v1-demo/node_modules/@babel/traverse/lib/path/context.js:40:17)
at NodePath.visit (/Users/chen/projects/github/docz-v1-demo/node_modules/@babel/traverse/lib/path/context.js:88:12)
at TraversalContext.visitQueue (/Users/chen/projects/github/docz-v1-demo/node_modules/@babel/traverse/lib/context.js:118:16)
at TraversalContext.visitMultiple (/Users/chen/projects/github/docz-v1-demo/node_modules/@babel/traverse/lib/context.js:85:17)
=============
at Object.<anonymous> (/Users/chen/projects/github/docz-v1-demo/node_modules/babel-plugin-export-metadata/src/index.js:18:30)
at Module._compile (module.js:635:30)
at Module._compile (/Users/chen/projects/github/docz-v1-demo/node_modules/pirates/lib/index.js:99:24)
at Module._extensions..js (module.js:646:10)
at Object.newLoader [as .js] (/Users/chen/projects/github/docz-v1-demo/node_modules/pirates/lib/index.js:104:7)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at requireModule (/Users/chen/projects/github/docz-v1-demo/node_modules/docz-core/node_modules/@babel/core/lib/config/files/plugins.js:165:12)
at loadPlugin (/Users/chen/projects/github/docz-v1-demo/node_modules/docz-core/node_modules/@babel/core/lib/config/files/plugins.js:68:17)
at createDescriptor (/Users/chen/projects/github/docz-v1-demo/node_modules/docz-core/node_modules/@babel/core/lib/config/config-descriptors.js:154:9)
at items.map (/Users/chen/projects/github/docz-v1-demo/node_modules/docz-core/node_modules/@babel/core/lib/config/config-descriptors.js:109:50)
@ ./packages/core/Button/README.mdx 15:0-44 70:8-14 92:14-20 93:17-26 103:9-15
@ ./.docz/app/imports.js
@ ./.docz/app/root.jsx
@ ./.docz/app/index.jsx
@ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./.docz/app/index.jsx
Expected behavior
It should show documentation
Environment
OS: OSX 10.14.1
Node/npm version: Node 8.9.0
The text was updated successfully, but these errors were encountered:
I'm having the same issue for @babel/plugin-proposal-export-default-from, a plugin that my codebase depends on.
TypeError: @babel/template placeholder "NAME": Property declaration of ExportDefaultDeclaration expected node to be of a type ["FunctionDeclaration","TSDeclareFunction","ClassDeclaration","Expression"] but instead got null
at Array.forEach (<anonymous>)
Bug Report
Describe the bug
Our company got our own babel preset which is similar to
create-react-app
preset, we always use it for build and compiling, I have removed the code which make use of that preset, but I found our preset could not work together withbabel-plugin-export-metadata
To Reproduce
git clone https://github.com/huchenme/docz-v1-issue-demo
yarn install
(need to use yarn)yarn start
Expected behavior
It should show documentation
Environment
The text was updated successfully, but these errors were encountered: