0

I just wanted to share an easy to use animated React container that is animated by tracking the mouse. (Preview: https://me-chip.com/)

It is working without any trouble in React and Next.js but if I update the npm packege with the latest version including the new "TrackingContainer" component I just can not include it in my example codepen.

Skypack https://cdn.skypack.dev/easy-react-hooks@v3.1.4 gives me this error:

 * [Package Error] "easy-react-hooks@v3.1.4" could not be built. 
 *
 *   [1/5] Verifying package is valid…
 *   [2/5] Installing dependencies from npm…
 *   [3/5] Building package using esinstall…
 *   Running esinstall...
 *   Failed to load node_modules/easy-react-hooks/hooks/TrackingContainer.js
 *     Unexpected token (29:8) in easy-react-hooks/hooks/TrackingContainer.js
 *   Install failed.
 *   Install failed.
 *
 * How to fix:
 *   - If you believe this to be an error in Skypack, file an issue here: https://github.com/skypackjs/skypack-cdn/issues
 *   - If you believe this to be an issue in the package, share this URL with the package authors to help them debug & fix.
 *   - Use https://skypack.dev/ to find a web-friendly alternative to find another package.
 */

console.warn("[Package Error] \"easy-react-hooks@v3.1.4\" could not be built. \n[1/5] Verifying package is valid…\n[2/5] Installing dependencies from npm…\n[3/5] Building package using esinstall…\nRunning esinstall...\nFailed to load node_modules/easy-react-hooks/hooks/TrackingContainer.js\n  Unexpected token (29:8) in easy-react-hooks/hooks/TrackingContainer.js\nInstall failed.\nInstall failed.");
throw new Error("[Package Error] \"easy-react-hooks@v3.1.4\" could not be built. ");
export default null;

I just cant find any problems. Aspecially searched for Unexpected token (29:8) and export default null but no clue whats wrong here. The other import working just fine.

Git: https://github.com/easy-bios/easyReactHooks

Btw: The codepen demo is just working now because i pasted the new TrackingConteiner component below the App component. https://codepen.io/easy-bios/pen/KKvVwdv

Edit:

Seems to be just a problem with Skypack. It is working in codesandbox.io https://codesandbox.io/s/react-trackingcontainer-ceszyn

Richy
  • 165
  • 6

0 Answers0