# ES Module problem

**URL:** <https://forum.fuel.network/t/es-module-problem/7994>\
**Category:** TypeScript SDK\
**Created:** [January 10, 2025, 2:50pm UTC](https://forum.fuel.network/t/es-module-problem/7994 "2025-01-10T14:50:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![miguel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/miguel/32/3064_2.png) [@miguel](https://forum.fuel.network/u/miguel)\
**Post date:** [January 10, 2025, 2:50pm UTC](https://forum.fuel.network/t/es-module-problem/7994/1 "2025-01-10T14:50:44Z")

</div>

When I ran `pnpm build`, I got an error like this:

```ts
file:///home/miguel/w/fuels-ts/templates/vite/tailwind.config.js:2
module.exports = {
^

ReferenceError: module is not defined

```

---

<div class="post-metadata">

**Author:** ![p.s](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/p.s/32/2491_2.png) [@p.s](https://forum.fuel.network/u/p.s)\
**Post date:** [January 10, 2025, 3:08pm UTC](https://forum.fuel.network/t/es-module-problem/7994/2 "2025-01-10T15:08:20Z")

</div>

Hey @miguel 👋

I assume that you’re building from the root of the `fuels-ts` repository?

I have not experienced this problem and our CI is currently [passing](https://github.com/FuelLabs/fuels-ts/actions/runs/12709553538/job/35428792361).

May be worth cleaning the repository and doing a rebuild:

```bash
# This command will erase all uncommitted changes
# Please commit/stash before proceeding
git clean -fdx
pnpm install
pnpm build

```

---

<div class="post-metadata">

**Author:** ![miguel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/miguel/32/3064_2.png) [@miguel](https://forum.fuel.network/u/miguel)\
**Post date:** [January 10, 2025, 3:26pm UTC](https://forum.fuel.network/t/es-module-problem/7994/3 "2025-01-10T15:26:59Z")

</div>

I ran all these commands. I’m still with same error. And yes, I’m building this from the root.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/fuel/original/2X/f/f8a2ca8eb34b99c9dea27cfa1f566e8c607f776a.png)  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/fuel/original/2X/d/d811af1bdfbd4ecb4fdccb0ed09ef232bfcffc03.png)

---

<div class="post-metadata">

**Author:** ![p.s](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/p.s/32/2491_2.png) [@p.s](https://forum.fuel.network/u/p.s)\
**Post date:** [January 10, 2025, 3:34pm UTC](https://forum.fuel.network/t/es-module-problem/7994/4 "2025-01-10T15:34:51Z")

</div>

Interesting.

Are you up to date with `master`?

---

<div class="post-metadata">

**Author:** ![miguel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/miguel/32/3064_2.png) [@miguel](https://forum.fuel.network/u/miguel)\
**Post date:** [January 10, 2025, 4:24pm UTC](https://forum.fuel.network/t/es-module-problem/7994/5 "2025-01-10T16:24:22Z")

</div>

> Are you up to date with `master` ?

Yes.

---

<div class="post-metadata">

**Author:** ![p.s](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/p.s/32/2491_2.png) [@p.s](https://forum.fuel.network/u/p.s)\
**Post date:** [January 10, 2025, 4:59pm UTC](https://forum.fuel.network/t/es-module-problem/7994/6 "2025-01-10T16:59:20Z")

</div>

Could you share you OS, Node Version, PNPM version?

If you rename the file to `tailwind.config.cjs` does it build successfully?

---

<div class="post-metadata">

**Author:** ![miguel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/miguel/32/3064_2.png) [@miguel](https://forum.fuel.network/u/miguel)\
**Post date:** [January 10, 2025, 5:50pm UTC](https://forum.fuel.network/t/es-module-problem/7994/7 "2025-01-10T17:50:23Z")

</div>

OS: Ubuntu  
Node Version: 22.12.0  
PNPM Version: 9.12.2

Yes.

---

<div class="post-metadata">

**Author:** ![p.s](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/p.s/32/2491_2.png) [@p.s](https://forum.fuel.network/u/p.s)\
**Post date:** [January 13, 2025, 10:51am UTC](https://forum.fuel.network/t/es-module-problem/7994/9 "2025-01-13T10:51:16Z")

</div>

I’ve created a [PR](https://github.com/FuelLabs/fuels-ts/pull/3579) to change this file from JS to TS which should unblock you.

Please feel free to branch off `ps/chore/favour-tailwind-ts` until it’s merge.

---

<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 3, 2025, 6:51am UTC](https://forum.fuel.network/t/es-module-problem/7994/10 "2025-02-03T06:51:23Z")

</div>

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