Code Monkey home page Code Monkey logo

Comments (8)

eulersson avatar eulersson commented on May 29, 2024 1

Actually I want to say I will fix it not in the elegant way of making the tool be able to dynamically resolve the path but to add a special case. In the future more users using node-gyp-build might run into similar problems but for now I will do it like @styfle suggested in this comment vercel/nft#391 (comment)

from node-gyp-build.

mafintosh avatar mafintosh commented on May 29, 2024

are you passing the __dirname to the exported func? sounds like you are passing the wrong dir

from node-gyp-build.

eulersson avatar eulersson commented on May 29, 2024

are you passing the __dirname to the exported func? sounds like you are passing the wrong dir

Many thanks for your response.

Can I set up the __dirname to be different just for one dependency? I guess the __dirname is fine to be at .next/server? I guess the the desired outcome would be to have the prebuilds folder in the .next/server somehow.

Do you know any other project that uses node-gyp-built deps with prebuilds in the context of a Next.js? Maybe it would help to see how people resolve this issue...

from node-gyp-build.

mafintosh avatar mafintosh commented on May 29, 2024

You can just “hoist” all the prebuilds from node_modules into that folder if the deps are on latest node-gyp-build. Ie mb move node_modules/sodium-native/prebuilds into .next/server/prebuilds

in a later version all the prebuilds are named so you can have them all in the same folder

from node-gyp-build.

eulersson avatar eulersson commented on May 29, 2024

If I move them manually and run npm run dev it cleans the entire .next/server and repopulates it missing the files I just copied. It does not seem to persist. I guess somewhere Next.js needs to be informed about those. I don't know what building infrastructure Next.js uses, maybe there's webpack involved underneath but I am not sure.

from node-gyp-build.

eulersson avatar eulersson commented on May 29, 2024

The problem has been identified, it's with vercel's file tracing tool "nft". I will provide a PR tomorrow. If someone is having this problem go to the issue on vercel's side vercel/nft#391, I will therefore close his one. Thanks @mafintosh for the response :)

from node-gyp-build.

eulersson avatar eulersson commented on May 29, 2024

Will be fixed if all goes will with this issue resolution vercel/nft#391 with PR vercel/nft#392.

from node-gyp-build.

eulersson avatar eulersson commented on May 29, 2024

@vercel/nft version 0.26.4 fixes it.

from node-gyp-build.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.