Comments (14)
I followed the steps and pushed the changes to the repo. It's showing the same behavior.
from integrationos.
from integrationos.
It worked on the window but its throwing errors on the terminal:
EDIT: Changes are pushed to GitHub. https://github.com/saadfrhan/integrationos-demo
from integrationos.
This could be due to the binary requirements when bundling in different OS. Our team will look into this and will get back to you early next week.
Again, thank you very much for sharing this with us and providing these helpful comments.
from integrationos.
We've confirmed an issue with the NAPI Rust package used in AuthKit across certain OS versions. Our team is rewriting the package in native TypeScript and will release an update in the coming days.
from integrationos.
These errors can be fully ignored, they have no impact on the application. As for the CORS, you will need to set the route in 'page.tsx' to the correspondent Vercel server url.
Please let me know if it does not work.
from integrationos.
Hello @saadfrhan,
Thanks for bringing this up! It looks like Webpack is trying to process a .node
binary file and isn't set up to handle it right now. You can fix this by adding node-loader
to your project:
-
Install
node-loader
:npm install --save-dev node-loader
-
Add this to your
next.config.js
:const nextConfig = { webpack: (config, { isServer }) => { if (!isServer) { config.module.rules.push({ test: /\.node$/, loader: 'node-loader', }); } return config; }, } module.exports = nextConfig
Restart your server after these changes, and you should be all set. Let me know how it goes!
Cheers!
from integrationos.
Can you please give me some info about your OS. It looks like a build issue.
from integrationos.
Turns out, handling node binaries in Next.js needs a bit of special attention.
Our team managed to sort it out with these steps:
- Run
npm install nextjs-node-loader --force
(force flag is needed due to some eslint incompatibilities, but it's all good, nothing to worry about). - Update
next.config.js
with the custom loader setup for.node
files.
Here's the snippet for our next.config.js
that did the trick:
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (config, { dev, isServer, webpack, nextRuntime }) => {
config.module.rules.push({
test: /\.node$/,
use: [
{
loader: "nextjs-node-loader",
},
],
});
return config;
}
};
export default nextConfig;
Should work after this. If you bump into any more quirks, let me know!
from integrationos.
Thanks! It worked. 🙌😊
from integrationos.
Are you by any chance trying to bundle the application for a different OS? Also, does the UI show with the activated integrations?
from integrationos.
When I deployed it to Vercel, it threw errors the same as in the screenshot and an error which says that it felt the corsHeaders as a route name.
So when I removed the export from corsHeaders, it deployed it but it threw CORS error on the console.
from integrationos.
Our team has identified the cause of the issue. It seems the warning from Next.js' build system can be ignored. It appears that Next.js tries to cache every package, even those that are dynamically loaded, likely to speed up builds.
To fix your code for deployment on Vercel, remove the export
from export const corsHeaders
in your route.ts
.
I am going to close this issue, put feel free to reopen if you still have any issues.
from integrationos.
I removed the export from the corsHeaders. (new code pushed to repo)
It ran successfully, but the terminal is showing same errors:
Vercel deployment is also showing same errors:
and I am getting cors error on production:
from integrationos.
Related Issues (2)
- Add security contact HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from integrationos.