1"use strict";(self.webpackChunkdocs_website=self.webpackChunkdocs_website||[]).push([["24432"],{12998(e,n,t){t.r(n),t.d(n,{metadata:()=>r,default:()=>h,frontMatter:()=>d,contentTitle:()=>o,toc:()=>a,assets:()=>c});var r=JSON.parse('{"id":"designing-studies/parser-errors","title":"Parser Errors and Warnings","description":"When reVISit parses your study config file, it checks for issues that could prevent the study from running correctly. Errors will stop the parser and must be fixed before you can run your study. Warnings indicate potential problems like unused components or configuration mistakes, but they won\'t prevent the study from running. Errors are expanded and warnings are collapsed by default.","source":"@site/docs/designing-studies/parser-errors.md","sourceDirName":"designing-studies","slug":"/designing-studies/parser-errors","permalink":"/docs/designing-studies/parser-errors","draft":false,"unlisted":false,"editUrl":"https://github.com/revisit-studies/reVISit-studies.github.io/edit/main/docs/designing-studies/parser-errors.md","tags":[],"version":"current","lastUpdatedAt":1790372643000,"frontMatter":{},"sidebar":"docs","previous":{"title":"ReVISit Libraries","permalink":"/docs/designing-studies/plugin-libraries"},"next":{"title":"Data And Deployment","permalink":"/docs/data-and-deployment/"}}'),s=t(74848),i=t(28453);let d={},o="Parser Errors and Warnings",c={},a=[{value:"Errors",id:"errors",level:2},{value:"Unresolved React component paths",id:"unresolved-react-component-paths",level:3},{value:"Warnings",id:"warnings",level:2}];function l(e){let n={code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"parser-errors-and-warnings",children:"Parser Errors and Warnings"})}),"\n",(0,s.jsx)(n.p,{children:"When reVISit parses your study config file, it checks for issues that could prevent the study from running correctly. Errors will stop the parser and must be fixed before you can run your study. Warnings indicate potential problems like unused components or configuration mistakes, but they won't prevent the study from running. Errors are expanded and warnings are collapsed by default."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"List of parser errors and warnings",src:t(88298).A+"",width:"2004",height:"1006"})}),"\n",(0,s.jsx)(n.h2,{id:"errors",children:"Errors"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Category"}),(0,s.jsx)(n.th,{children:"Message"}),(0,s.jsx)(n.th,{children:"Action"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Invalid Config"}),(0,s.jsx)(n.td,{children:"There was an issue validating your config file"}),(0,s.jsx)(n.td,{children:"Fix the errors in your file or make sure the global config references the right file path"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Invalid Library Config"}),(0,s.jsx)(n.td,{children:"Library config is not valid"}),(0,s.jsx)(n.td,{children:"Fix the errors in the library config"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Undefined Library"}),(0,s.jsx)(n.td,{children:"Library not found in imported libraries"}),(0,s.jsx)(n.td,{children:"Check the library name and make sure the library is imported correctly"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Undefined Library"}),(0,s.jsx)(n.td,{children:"Could not find library"}),(0,s.jsx)(n.td,{children:"Make sure the library is in the correct location"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Undefined Base Component"}),(0,s.jsx)(n.td,{children:"Base component is not defined in baseComponents object"}),(0,s.jsx)(n.td,{children:"Add the base component to the baseComponents object"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Undefined Base Component"}),(0,s.jsx)(n.td,{children:"Base component is not defined in baseComponents object in library"}),(0,s.jsx)(n.td,{children:"Add the base component to the baseComponents object"})]}
1),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Undefined Component"}),(0,s.jsx)(n.td,{children:"Component is not defined in components object"}),(0,s.jsx)(n.td,{children:"Add the component to the components object"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Undefined Component"}),(0,s.jsx)(n.td,{children:"Unresolved path"}),(0,s.jsxs)(n.td,{children:["Make sure the React component exists under ",(0,s.jsx)(n.code,{children:"src/public/"})," and that its ",(0,s.jsx)(n.code,{children:"path"})," is relative to ",(0,s.jsx)(n.code,{children:"src/public/"}),", not ",(0,s.jsx)(n.code,{children:"public/"})]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Sequence Validation"}),(0,s.jsx)(n.td,{children:"Component is a base component and cannot be used in the sequence"}),(0,s.jsx)(n.td,{children:"Remove the base component from the sequence"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Sequence Validation"}),(0,s.jsx)(n.td,{children:"Sequence not found in library"}),(0,s.jsx)(n.td,{children:"Check the sequence name"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Sequence Validation"}),(0,s.jsx)(n.td,{children:"Conditional URL parameter assignment cannot be combined with random or latinSquare sequence ordering"}),(0,s.jsx)(n.td,{children:"Use fixed ordering when using conditional blocks, or remove conditional blocks"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Skip Validation"}),(0,s.jsx)(n.td,{children:"Skip target does not occur after the skip block it is used in"}),(0,s.jsx)(n.td,{children:"Add the target to the sequence after the skip block"})]})]})]}),"\n",(0,s.jsx)(n.h3,{id:"unresolved-react-component-paths",children:"Unresolved React component paths"}),"\n",(0,s.jsxs)(n.p,{children:["ReVISit verifies the ",(0,s.jsx)(n.code,{children:"path"})," of every ",(0,s.jsx)(n.code,{children:"react-component"}),", including React components defined in ",(0,s.jsx)(n.code,{children:"baseComponents"})," or inherited by another component. For example, this configuration expects the file at ",(0,s.jsx)(n.code,{children:"src/public/my-study/assets/Chart.tsx"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",metastring:'title="public/my-study/config.json"',children:'{\n "type": "react-component",\n "path": "my-study/assets/Chart.tsx"\n}\n'})}),"\n",(0,s.jsxs)(n.p,{children:["If the file cannot be found, the parser reports an ",(0,s.jsx)(n.strong,{children:"Unresolved path"})," error before the study starts. React component files belong under ",(0,s.jsx)(n.code,{children:"src/public/"}),"; most non-React assets, such as images and videos, belong under ",(0,s.jsx)(n.code,{children:"public/"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"warnings",children:"Warnings"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Category"}),(0,s.jsx)(n.th,{children:"Message"}),(0,s.jsx)(n.th,{children:"Action"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Sequence Validation"}),(0,s.jsx)(n.td,{children:"Sequence has an empty components array"}),(0,s.jsx)(n.td,{children:"Remove empty components block"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Unused Component"}),(0,s.jsx)(n.td,{children:"Component is defined in components object but not used deterministically in the sequence"}),(0,s.jsx)(n.td,{children:"Remove the component from the components object or add it to the sequence"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Disabled Sidebar"}),(0,s.jsx)(n.td,{children:"Component uses sidebar locations but sidebar is disabled"}),(0,s.jsx)(n.td,{children:"Enable the sidebar or move the location to belowStimulus or aboveStimulus"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Default Contact Email"}),(0,s.jsxs)(n.td,{children:["The contact email is set to the default value ",(0,s.jsx)(n.code,{children:"[email protected]"}),". Please update it to your own email address"]}),(0,s.jsx)(n.td,{children:"Update the contactEmail field in uiConfig to your own email address"})]})]})]})]})}function h(e={}){let{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},88298(e,n,t){t.d(n,{A:()=>r});let r=t.p+"assets/images/errors-warnings-4b18b62714b2da56c5b673dca15c08ea.png"},28453(e,n,t){t.d(n,{R:()=>d,x:()=>o});var r=t(96540);let s={},i=r.createContext(s);function d(e){let n=r.useContext(i);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:d(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.