widgets icon indicating copy to clipboard operation
widgets copied to clipboard

Widget require `hardhat` as a dependency

Open 0xGabi opened this issue 2 years ago • 1 comments

Bug Description After integration of the widget on a Remix app. Our automatic deployment with netlify was not able to install dependencies on the server because hardhat was required as a dependency.

Steps to Reproduce

  1. Install a widget on a Remix boilerplate app
  2. Configure netlify for automatic deployments
  3. View deployment log errors on the Functions bundling step

Expected Behavior Not require hardhat as a dependency.

Additional Context Netlify log output:

7:57:58 PM: ────────────────────────────────────────────────────────────────
7:57:58 PM:   2. Functions bundling                                         
7:57:58 PM: ────────────────────────────────────────────────────────────────
7:57:58 PM: ​
7:57:58 PM: Packaging Functions from .netlify/functions-internal directory:
7:57:58 PM:  - server.js
7:57:58 PM: ​
7:58:03 PM: ​
7:58:03 PM: ────────────────────────────────────────────────────────────────
7:58:03 PM:   Dependencies installation error                               
7:58:03 PM: ────────────────────────────────────────────────────────────────
7:58:03 PM: ​
7:58:03 PM:   Error message
7:58:03 PM:   A Netlify Function failed to require one of its dependencies.
7:58:03 PM:   Please make sure it is present in the site's top-level "package.json".
​
7:58:03 PM:   In file "/opt/build/repo/.netlify/functions-internal/server.js"
7:58:03 PM:   Cannot find module 'hardhat'
7:58:03 PM:   Require stack:
7:58:03 PM:   - /opt/buildhome/node-deps/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/node/bundlers/zisi/resolve.js

Note that if we include hardhat as a dev dependency the issue is fixed though we hit the server size limit with the following error: Request must be smaller than 69905067 bytes for the CreateFunction operation.

0xGabi avatar May 25 '22 17:05 0xGabi