Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NX Cannot find module '@swc/types' #79

Open
metasal1 opened this issue Jul 21, 2024 · 1 comment
Open

NX Cannot find module '@swc/types' #79

metasal1 opened this issue Jul 21, 2024 · 1 comment
Assignees

Comments

@metasal1
Copy link

When running
nx build web

The error is
NX Cannot find module '@swc/types'

This might be setup or inexperience with NX

FYI - nx serve web works fine

@beeman beeman self-assigned this Jul 23, 2024
@beeman
Copy link
Collaborator

beeman commented Jul 23, 2024

Hi there @metasal1 - could you try this again with version 3.0.5 I just promoted to latest?

If that doesn't work, would you mind sharing the output from the commands and the repo it generated so I can investigate? Cheers!

(base) [[email protected]] solana-local $ pnpx create-solana-dapp@latest "test-swc"
 WARN  3 deprecated subdependencies found: [email protected], [email protected], [email protected]
Packages: +131
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 140, reused 131, downloaded 0, added 131, done
Library/Caches/pnpm/dlx/ltc4cak3zirodydd4s7u2fveny/190df6120c1-394e/node_modules/.pnpm/[email protected]/node_modules/nx: RuLibrary/Caches/pnpm/dlx/ltc4cak3zirodydd4s7u2fveny/190df6120c1-394e/node_modules/.pnpm/[email protected]/node_modules/nx: Running postinstall script, done in 419ms
┌  create-solana-dapp 3.0.5
│
◆  Project name: test-swc
│
◇  Select a preset
│  Next.js
│
◇  Select a UI library
│  Tailwind
│
◇  Select an Anchor template
│  Anchor Counter program with tests
│
◆  Anchor program name: test-swc
│
◇  Successfully created workspace with pnpm.
│
◇  Successfully installed preset @solana-developers/[email protected].
│
◇  Installation successful! ─────────────────────────────────────╮
│                                                                │
│  That's it!                                                    │
│                                                                │
│  Change to your new directory and start developing:            │
│                                                                │
│  cd ./test-swc                                                 │
│                                                                │
│  Start the Next.js app:                                        │
│                                                                │
│  pnpm run dev                                                  │
│                                                                │
│  Run Anchor commands:                                          │
│                                                                │
│  pnpm run anchor build | test | localnet | deploy              │
│                                                                │
│  Generate more features using the following command:           │
│                                                                │
│  pnpm run feature                                              │
│                                                                │
│  Found Anchor version 0.30.1. Expected Anchor version 0.30.0.  │
│                                                                │
│  https://www.anchor-lang.com/release-notes/0.30.0              │
│                                                                │
├────────────────────────────────────────────────────────────────╯
│
└  Good luck with your project!

(base) [[email protected]] solana-local $ cd test-swc
(base) [[email protected]] test-swc (main) $ pnpm nx build web

   ✔  1/1 dependent project tasks succeeded [0 read from cache]

   Hint: you can run the command with --verbose to see the full dependent project outputs

———————————————————————————————————————————————————————————————————————————————————————————————————————————————————


> nx run web:build:production

   ▲ Next.js 14.0.4


🌼   daisyUI 4.11.1
├─ ✔︎ 2 themes added		https://daisyui.com/docs/themes
╰─ ❤︎ Support daisyUI project:	https://opencollective.com/daisyui

 ✓ Creating an optimized production build
 ✓ Compiled successfully
   Skipping linting
 ✓ Checking validity of types
 ✓ Collecting page data
   Generating static pages (0/8)  [=   ]bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
 ✓ Generating static pages (8/8)
 ✓ Collecting build traces
 ✓ Finalizing page optimization

Route (app)                              Size     First Load JS
┌ ○ /                                    613 B           249 kB
├ ○ /_not-found                          869 B          82.9 kB
├ ○ /account                             1.35 kB         229 kB
├ λ /account/[address]                   559 B           249 kB
├ ○ /api/hello                           0 B                0 B
├ ○ /clusters                            452 B           249 kB
└ ○ /test-swc                            2.39 kB         251 kB
+ First Load JS shared by all            82.1 kB
  ├ chunks/771-2ce65bc9d22348e2.js       26.7 kB
  ├ chunks/9fbbc2ce-23a1d89630bc4ddb.js  53.3 kB
  ├ chunks/main-app-245333a16b7443df.js  216 B
  └ chunks/webpack-16f47013c1a91d94.js   1.86 kB


○  (Static)   prerendered as static content
λ  (Dynamic)  server-rendered on demand using Node.js


———————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 NX   Successfully ran target build for project web and 1 task it depends on (16s)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants