# Running fuels on NextJS

**URL:** <https://forum.fuel.network/t/running-fuels-on-nextjs/1132>\
**Category:** TypeScript SDK\
**Tags:** faqs\
**Created:** [December 22, 2022, 3:41pm UTC](https://forum.fuel.network/t/running-fuels-on-nextjs/1132 "2022-12-22T15:41:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![proteus](https://avatars.discourse-cdn.com/v4/letter/p/0ea827/32.png) [@proteus](https://forum.fuel.network/u/proteus)\
**Post date:** [December 22, 2022, 3:41pm UTC](https://forum.fuel.network/t/running-fuels-on-nextjs/1132/1 "2022-12-22T15:41:34Z")

</div>

I’m trying to run an app using nextJS with fuels. When it compiles it gives the following error

SyntaxError: Named export ‘ec’ not found. The requested module ‘elliptic’ is a CommonJS module, which may not support all module.exports as named exports.

I can fix this locally by changing the import on

> <https://github.com/FuelLabs/fuels-ts/blob/b11abfacf99088229db8ff305460b5080a2e1024/packages/signer/src/signer.ts#L7>

to  
import pkg from"elliptic";

const p = pkg.ec

But this fix is not valid when building the project on vercel. Is there a workaround for this ?

---

<div class="post-metadata">

**Author:** ![sarah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/sarah/32/13_2.png) [@sarah](https://forum.fuel.network/u/sarah)\
**Post date:** [December 22, 2022, 4:38pm UTC](https://forum.fuel.network/t/running-fuels-on-nextjs/1132/2 "2022-12-22T16:38:38Z")

</div>

Great question! You need to change the next config to set esmExternals to false.

```auto
experimental: {
    esmExternals: false,
 },

```

You can see an example here: [webgum/next.config.js at main · Webgum/webgum · GitHub](https://github.com/Webgum/webgum/blob/main/next.config.js)

---

<div class="post-metadata">

**Author:** ![proteus](https://avatars.discourse-cdn.com/v4/letter/p/0ea827/32.png) [@proteus](https://forum.fuel.network/u/proteus)\
**Post date:** [December 22, 2022, 5:18pm UTC](https://forum.fuel.network/t/running-fuels-on-nextjs/1132/3 "2022-12-22T17:18:26Z")

</div>

This worked, thank you!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/fuel/original/2X/5/57d5a345cc15a64b636e0d56e042857f8a0e80b1.png) [@system](https://forum.fuel.network/u/system)\
**Post date:** [February 20, 2023, 6:58am UTC](https://forum.fuel.network/t/running-fuels-on-nextjs/1132/4 "2023-02-20T06:58:52Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
