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

Module not found: Can't resolve 'fs' #1198

Open
maiconsanson opened this issue Dec 8, 2023 · 1 comment
Open

Module not found: Can't resolve 'fs' #1198

maiconsanson opened this issue Dec 8, 2023 · 1 comment

Comments

@maiconsanson
Copy link

maiconsanson commented Dec 8, 2023

Overview
After upgrade to NextJs 14.0.4 , the "ibm-watson": "8.0.0" package give me the following error:

Module not found: Can't resolve 'fs'
Import trace for requested module:
./node_modules/.pnpm/ibm-cloud-sdk-core@4.2.0/node_modules/ibm-cloud-sdk-core/auth/utils/file-reading-helpers.js
./node_modules/.pnpm/ibm-cloud-sdk-core@4.2.0/node_modules/ibm-cloud-sdk-core/auth/utils/index.js
./node_modules/.pnpm/ibm-cloud-sdk-core@4.2.0/node_modules/ibm-cloud-sdk-core/auth/index.js
./node_modules/.pnpm/ibm-cloud-sdk-core@4.2.0/node_modules/ibm-cloud-sdk-core/index.js
./node_modules/.pnpm/ibm-watson@8.0.0/node_modules/ibm-watson/auth/index.js

If I import one of both, the problem occurs:

import { IamAuthenticator } from 'ibm-watson/auth'
import TextToSpeechV1 from 'ibm-watson/text-to-speech/v1'

Expected behavior
No errors should appear.

Actual behavior
Errors show up when starting the server.

How to reproduce
Create a new application with the last stable NextJs 14.0.4, use some import cited at the overview, and start the server as pnpm run dev.

SDK Version
8.0.0

Additional information:

  • Operating System:
    • Platform: darwin
    • Arch: arm64
    • Version: Darwin Kernel Version 22.6.0: Fri Sep 15 13:41:28 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_ARM64_T6000
  • Binaries:
    • Node: 18.18.2
    • npm: 9.8.1
    • Yarn: 1.22.21
    • pnpm: 8.11.0
  • Relevant Packages:
    • next: 14.0.4
    • eslint-config-next: 14.0.4
    • react: 18.2.0
    • react-dom: 18.2.0
    • typescript: 5.3.2
  • Next.js Config:
    • output: N/A
@apaparazzi0329
Copy link
Contributor

Apologies for the late response. Can you try this again with the latest version of the ibm-cloud-sdk-core 4.2.3? I tried using the example project provided by NextJS but was unable to replicate your results.

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

No branches or pull requests

2 participants