Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,63 @@ Ready-to-use, copy-paste examples with explanations.

🔹 For more advanced use cases check the [full documentation](https://constructor-io.github.io/constructorio-ui-autocomplete/?path=/docs/autocomplete-component-advanced-parameters--docs)

## 🛠 Troubleshooting

Common issues and solutions.

<table>
<thead>
<tr>
<th>Problem</th>
<th>Description</th>
<th>Solution</th>
</tr>
</thead>
<tbody>
<tr>
<td>Older JavaScript environments</td>
<td>
The library provides two different builds. CommonJS (cjs) and ECMAScript Modules (mjs)
<br>
<br>
For ECMAScript Modules (mjs) build, the JavaScript version is ESNext which might not be supported by your environment. If that's the case and your environment is using an older Javascript version like ES6 (ES2015), you might get this error.
<br>
<br>
<code>Module parse failed: Unexpected token (15:32) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file</code>
</td>
<td>
To solve this you can import the CommonJS (cjs) build which supports ES6 (ES2015) syntax:
<br>
<br>
<code>import CioAutocomplete from '@constructor-io/constructorio-ui-autocomplete/cjs'</code>
</td>
</tr>
<tr>
<td>ESLint</td>
<td>
There is a known issue with ESLint where it fails to resolve the paths exposed in the exports statement of NPM packages.
<br>
<br>
For ECMAScript Modules (mjs) build. The Javascript version is ESNext which might not be supported by your environment. If that's the case and your environment is using an older Javascript version like ES6 (ES2015), you might get this error.
<br>
<br>
<code>Unable to resolve path to module '@constructor-io/constructorio-ui-autocomplete/styles.css'</code>
<br>
<br>
Relevant open issues:
<ul>
<li><a href='https://github.com/import-js/eslint-plugin-import/issues/1868'>Issue 1868</a>
<li><a href='https://github.com/import-js/eslint-plugin-import/issues/1810'>Issue 1810</a>
</td>
<td>
If you are receiving the following error, you can safely disable ESLint using <code>// eslint-disable-line</code> for that line.
</td>
</tr>
</tbody>
</table>

💬 Need help? Join our [GitHub Discussions](https://github.com/Constructor-io/constructorio-ui-autocomplete/discussions)

## 📖 API Reference

<!-- TODO: reference the API docs from storybook -->
Expand Down
Loading