Closed kevinfosse closed 12 months ago
I"m on Next.js v13.4.9 Node v20.0.0
omg, will check. i had some personal issues yesterday and couldn't responded well sorry
@kevinfosse i think this is now resolved in the latest release. can you try again after updating to v1.3.1?
@junhoyeo I got error on newest version: "version": "1.3.1"
Module not found: Can't resolve 'threads-api'
https://nextjs.org/docs/messages/module-not-found
@junhoyeo Using "threads-api": "^1.3.1",
In React 18.2.0
ERROR in ./node_modules/mime-types/index.js 15:14-37 Module not found: Error: Can't resolve 'path' in 'C:\Users\kevinf\Desktop\threads\testv2\node_modules\mime-types'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
ERROR in ./node_modules/threads-api/build/threads-api.js 522:21-34 Module not found: Error: Can't resolve 'fs' in 'C:\Users\kevinf\Desktop\threads\testv2\node_modules\threads-api\build'
I don't know if it can help you but in your thread-api package.json i don't see "fs"
@khuepm Didn't know that meme-types
was using fs
lol... we changed that to mrmime
in #109.
Can you update to v1.3.2 (just been deployed) and try again?
@junhoyeo I got error on newest version:
"version": "1.3.1"
Module not found: Can't resolve 'threads-api' https://nextjs.org/docs/messages/module-not-found
@khuepm Can you check if the package is installed correctly?
@junhoyeo I tried the version 1.3.2, Mime-types no longer causes problems. Now i only get the problem with fs
@kevinfosse I'll research. Is it the same error/callstack as the original issue you first filed? (./node_modules/threads-api/build/threads-api.js:1:175 / Module not found: Can't resolve 'fs'
)
Meanwhile, here's a quick fix:
// (next.config.js)
// ...
webpack: (config) => {
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
}
}
This is the error i got :
ERROR in ./node_modules/threads-api/build/threads-api.js 567:21-34 Module not found: Error: Can't resolve 'fs' in 'C:\Users\kevinf\Desktop\threads\testv2\node_modules\threads-api\build'
Thanks for your quick fix, will try ASAP
Hello, just a little update, your workaround work !
Thanks you !
Hi, I'm coming to you because I'd like to integrate the API into a NextJS project, but I'm getting an error when I try to use it and I don't know where it's coming from...
This error occurred during the build process and can only be dismissed by fixing the error.
Here is my code :