Git Product home page Git Product logo

Comments (5)

AlexBlokh avatar AlexBlokh commented on August 16, 2024 7

thank you, we've discussed this recently and will now prioritise 👍

from drizzle-orm.

rizen avatar rizen commented on August 16, 2024

This has become a showstopper for me as well. I ultimately can't compile for production because of this.

from drizzle-orm.

rizen avatar rizen commented on August 16, 2024

When I go to compile my app I get errors like this:

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/jtsmith/ving/.output/server/node_modules/drizzle-orm/mysql-core/expressions' imported from /Users/jtsmith/ving/.output/server/index.mjs

These errors are not coming from my code, but actually modules inside of drizzle referencing each other.

Probably not that helpful to you, but I thought I'd add some context just in case.

from drizzle-orm.

rizen avatar rizen commented on August 16, 2024

I've found a way to work around this problem. It's nasty, but it works.

import type { MySql2Database } from 'drizzle-orm/mysql2/index.js';
import type { SQL } from 'drizzle-orm/sql/index.js';
import { sql } from 'drizzle-orm/index.js';
import { like, eq, asc, desc, and, or, ne } from 'drizzle-orm/mysql-core/expressions.js';
import { Name } from "drizzle-orm/table.js";
import { AnyMySqlColumn } from 'drizzle-orm/mysql-core/index.js';

As you can see, I can refer to a specific filename and then I don't get the Cannot find module '/Users/jtsmith/ving/.output/server/node_modules/drizzle-orm/mysql-core/expressions' error.

Credit where credit is do, it was actually @pi0 who figured it out.

from drizzle-orm.

filipsobol avatar filipsobol commented on August 16, 2024

I was getting ERR_UNSUPPORTED_DIR_IMPORT errors caused by missing exports.

The above workaround works for this as well.

from drizzle-orm.

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.