Skip to content

Error importing @rocket.chat/fuselage-tokens/breakpoints.json in chore/tamagui branch due to exports field #1611

@Anxhul10

Description

@Anxhul10

Branch: chore/tamagui
Package: @rocket.chat/fuselage-tokens
Issue: Unable to import breakpoints.json directly due to the exports field in package.json.

Description

While using the chore/tamagui branch, I encountered an error when importing the breakpoints.json file like this:

logs

➜  fuselage-hooks git:(chore/tamagui) ✗ cat /tmp/xfs-c9dfa37c/build.log
# This file contains the result of Yarn building a package (@rocket.chat/fuselage-monorepo@workspace:.)
# Script name: postinstall

husky - install command is DEPRECATED
turbo 2.4.4

• Packages in scope: @rocket.chat/css-in-js, @rocket.chat/css-supports, @rocket.chat/emitter, @rocket.chat/fuselage, @rocket.chat/fuselage-core, @rocket.chat/fuselage-hooks, @rocket.chat/fuselage-polyfills, @rocket.chat/fuselage-tamagui-tokens, @rocket.chat/fuselage-toastbar, @rocket.chat/fuselage-tokens, @rocket.chat/icons, @rocket.chat/layout, @rocket.chat/logo, @rocket.chat/memo, @rocket.chat/mp3-encoder, @rocket.chat/onboarding-ui, @rocket.chat/peggy-loader, @rocket.chat/prettier-config, @rocket.chat/string-helpers, @rocket.chat/styled, @rocket.chat/stylis-logical-props-middleware, build-design-tokens, build-icons, build-logo, fuselage-tamagui, lint-all, scripts, testing-utils, tools-utils, update-readme
• Running build in 30 packages
• Remote caching disabled
@rocket.chat/fuselage-core:build: cache miss, executing a230f27ba935b815
@rocket.chat/memo:build: cache miss, executing 07d01e63b9c6da48
@rocket.chat/mp3-encoder:build: cache miss, executing 6272b31b742b983c
@rocket.chat/emitter:build: cache miss, executing 39dd6b33ded83423
@rocket.chat/string-helpers:build: cache miss, executing f384d495729a2979
@rocket.chat/peggy-loader:build: cache miss, executing 4615ffbd99b039d7
@rocket.chat/fuselage-tokens:build: cache miss, executing ec3bc25e3b216f0c
@rocket.chat/icons:build: cache miss, executing be9846c90a011738
@rocket.chat/fuselage-core:build: built @rocket.chat/fuselage-core in 60 ms
@rocket.chat/emitter:build: 
@rocket.chat/emitter:build: src/index.ts → dist, dist, dist...
@rocket.chat/mp3-encoder:build: 
@rocket.chat/mp3-encoder:build: src/index.ts → dist...
@rocket.chat/icons:build: (node:3181826) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
@rocket.chat/icons:build: (Use `node --trace-deprecation ...` to show where the warning was created)
@rocket.chat/icons:build: 
@rocket.chat/icons:build: 
@rocket.chat/emitter:build: created dist, dist, dist in 5.2s
@rocket.chat/fuselage-tokens:build: 
@rocket.chat/fuselage-tokens:build: 
@rocket.chat/fuselage-tokens:build: 
@rocket.chat/fuselage-tokens:build: 
@rocket.chat/fuselage-tokens:build: 
@rocket.chat/fuselage-tokens:build: 
@rocket.chat/css-supports:build: cache miss, executing 566a22ebcba8c2c1
@rocket.chat/mp3-encoder:build: created dist in 8.1s
@rocket.chat/mp3-encoder:build: 
@rocket.chat/mp3-encoder:build: src/index.ts → dist/index.mjs...
@rocket.chat/fuselage-tokens:build: Build started...
@rocket.chat/fuselage-tokens:build: 
@rocket.chat/fuselage-tokens:build: ==============================================
@rocket.chat/fuselage-tokens:build: 
@rocket.chat/fuselage-tokens:build: mjs
@rocket.chat/fuselage-tokens:build: ✔︎ dist/badge.mjs
@rocket.chat/fuselage-tokens:build: ✔︎ dist/breakpoints.mjs
@rocket.chat/fuselage-tokens:build: ✔︎ dist/button.mjs
@rocket.chat/fuselage-tokens:build: ✔︎ dist/colors.mjs
@rocket.chat/fuselage-tokens:build: ✔︎ dist/font.mjs
@rocket.chat/fuselage-tokens:build: ✔︎ dist/shadow.mjs
@rocket.chat/fuselage-tokens:build: ✔︎ dist/status.mjs
@rocket.chat/fuselage-tokens:build: ✔︎ dist/statusBullet.mjs
@rocket.chat/fuselage-tokens:build: ✔︎ dist/stroke.mjs
@rocket.chat/fuselage-tokens:build: ✔︎ dist/surface.mjs
@rocket.chat/fuselage-tokens:build: ✔︎ dist/typography.mjs
@rocket.chat/fuselage-tokens:build: 
@rocket.chat/fuselage-tokens:build: js
@rocket.chat/fuselage-tokens:build: ✔︎ dist/badge.js
@rocket.chat/fuselage-tokens:build: ✔︎ dist/breakpoints.js
@rocket.chat/fuselage-tokens:build: ✔︎ dist/button.js
@rocket.chat/fuselage-tokens:build: ✔︎ dist/colors.js
@rocket.chat/fuselage-tokens:build: ✔︎ dist/font.js
@rocket.chat/fuselage-tokens:build: ✔︎ dist/shadow.js
@rocket.chat/fuselage-tokens:build: ✔︎ dist/status.js
@rocket.chat/fuselage-tokens:build: ✔︎ dist/statusBullet.js
@rocket.chat/fuselage-tokens:build: ✔︎ dist/stroke.js
@rocket.chat/fuselage-tokens:build: ✔︎ dist/surface.js
@rocket.chat/fuselage-tokens:build: ✔︎ dist/typography.js
@rocket.chat/fuselage-tokens:build: 
@rocket.chat/fuselage-tokens:build: json
@rocket.chat/fuselage-tokens:build: ✔︎ dist/badge.json
@rocket.chat/fuselage-tokens:build: ✔︎ dist/breakpoints.json
@rocket.chat/fuselage-tokens:build: ✔︎ dist/button.json
@rocket.chat/fuselage-tokens:build: ✔︎ dist/colors.json
@rocket.chat/fuselage-tokens:build: ✔︎ dist/font.json
@rocket.chat/fuselage-tokens:build: ✔︎ dist/shadow.json
@rocket.chat/fuselage-tokens:build: ✔︎ dist/status.json
@rocket.chat/fuselage-tokens:build: ✔︎ dist/statusBullet.json
@rocket.chat/fuselage-tokens:build: ✔︎ dist/stroke.json
@rocket.chat/fuselage-tokens:build: ✔︎ dist/surface.json
@rocket.chat/fuselage-tokens:build: ✔︎ dist/typography.json
@rocket.chat/fuselage-tokens:build: 
@rocket.chat/fuselage-tokens:build: scss
@rocket.chat/fuselage-tokens:build: ✔︎ dist/badge.scss
@rocket.chat/fuselage-tokens:build: ✔︎ dist/breakpoints.scss
@rocket.chat/fuselage-tokens:build: ✔︎ dist/button.scss
@rocket.chat/fuselage-tokens:build: ✔︎ dist/colors.scss
@rocket.chat/fuselage-tokens:build: ✔︎ dist/font.scss
@rocket.chat/fuselage-tokens:build: ✔︎ dist/shadow.scss
@rocket.chat/fuselage-tokens:build: ✔︎ dist/status.scss
@rocket.chat/fuselage-tokens:build: ✔︎ dist/statusBullet.scss
@rocket.chat/fuselage-tokens:build: ✔︎ dist/stroke.scss
@rocket.chat/fuselage-tokens:build: ✔︎ dist/surface.scss
@rocket.chat/fuselage-tokens:build: ✔︎ dist/typography.scss
@rocket.chat/fuselage-tokens:build: 
@rocket.chat/fuselage-tokens:build: ==============================================
@rocket.chat/fuselage-tokens:build: 
@rocket.chat/fuselage-tokens:build: Build completed!
@rocket.chat/fuselage-hooks:build: cache miss, executing 586e8c26ced0e24c
@rocket.chat/stylis-logical-props-middleware:build: cache miss, executing 9d571d2e7ec77da7
@rocket.chat/fuselage-hooks:build: 
@rocket.chat/fuselage-hooks:build: src/index.ts → dist, dist, dist...
@rocket.chat/mp3-encoder:build: created dist/index.mjs in 3.7s
@rocket.chat/fuselage-hooks:build: [!] Error: Could not load /home/anxhul/CodeVault/github/tamagui/fuselage-tamagui/packages/fuselage-tokens/dist/breakpoints.json.js (imported by src/useBreakpoints.ts): ENOENT: no such file or directory, open '/home/anxhul/CodeVault/github/tamagui/fuselage-tamagui/packages/fuselage-tokens/dist/breakpoints.json.js'
@rocket.chat/fuselage-hooks:build: Error: Could not load /home/anxhul/CodeVault/github/tamagui/fuselage-tamagui/packages/fuselage-tokens/dist/breakpoints.json.js (imported by src/useBreakpoints.ts): ENOENT: no such file or directory, open '/home/anxhul/CodeVault/github/tamagui/fuselage-tamagui/packages/fuselage-tokens/dist/breakpoints.json.js'
@rocket.chat/fuselage-hooks:build:     at open (node:internal/fs/promises:638:25)
@rocket.chat/fuselage-hooks:build:     at Object.readFile (node:internal/fs/promises:1238:14)
@rocket.chat/fuselage-hooks:build:     at /home/anxhul/CodeVault/github/tamagui/fuselage-tamagui/node_modules/rollup/dist/shared/rollup.js:22050:182
@rocket.chat/fuselage-hooks:build:     at Queue.work (/home/anxhul/CodeVault/github/tamagui/fuselage-tamagui/node_modules/rollup/dist/shared/rollup.js:22989:32)
@rocket.chat/fuselage-hooks:build: 
@rocket.chat/fuselage-hooks:build: ERROR: ".:build:rollup" exited with 1.
@rocket.chat/fuselage-hooks:build: ERROR: command finished with error: command (/home/anxhul/CodeVault/github/tamagui/fuselage-tamagui/packages/fuselage-hooks) /tmp/xfs-64a7bf05/yarn run build exited (1)
@rocket.chat/fuselage-hooks#build: command (/home/anxhul/CodeVault/github/tamagui/fuselage-tamagui/packages/fuselage-hooks) /tmp/xfs-64a7bf05/yarn run build exited (1)

 Tasks:    9 successful, 11 total
Cached:    0 cached, 11 total
  Time:    16.483s 
Failed:    @rocket.chat/fuselage-hooks#build

 ERROR  run failed: command  exited (1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions