Comments (7)
I'm currently looking into this!
Related:
getsentry/sentry-javascript#12325
from import-in-the-middle.
As Prisma is CJS, I think this is fixed by #96 but I need to confirm.
from import-in-the-middle.
A warning is logged to the console but it no longer throws.
#108 actually fixes the prisma issue
from import-in-the-middle.
https://github.com/nodejs/import-in-the-middle/releases
https://github.com/nodejs/import-in-the-middle/releases.atom
from import-in-the-middle.
@timfish Thank you for responding promptly. Looking forward to your updates.
from import-in-the-middle.
Hello @timfish
I just used the latest version 1.8.1, but the issue still persists. I am now encountering the following error:
Error: 'import-in-the-middle' failed to wrap 'file:///artifacts/packages/collector/test/tracing/database/prisma/node_modules/@prisma/client/default.js'
at getSource (/artifacts/packages/core/node_modules/import-in-the-middle/hook.js:304:21)
at async load (/artifacts/packages/core/node_modules/import-in-the-middle/hook.js:319:26)
at async nextLoad (node:internal/modules/esm/hooks:866:22)
at async Hooks.load (node:internal/modules/esm/hooks:449:20)
at async MessagePort.handleMessage (node:internal/modules/esm/worker:196:18) {
cause: TypeError: emitImportAssertionWarning is not a function
at defaultLoad (node:internal/modules/esm/load:119:5)
at nextLoad (node:internal/modules/esm/hooks:866:28)
at getExports (/artifacts/packages/core/node_modules/import-in-the-middle/lib/get-exports.js:80:27)
at processModule (/artifacts/packages/core/node_modules/import-in-the-middle/hook.js:131:29)
at getSource (/artifacts/packages/core/node_modules/import-in-the-middle/hook.js:269:31)
at load (/artifacts/packages/core/node_modules/import-in-the-middle/hook.js:319:32)
at nextLoad (node:internal/modules/esm/hooks:866:28)
at Hooks.load (node:internal/modules/esm/hooks:449:26)
at MessagePort.handleMessage (node:internal/modules/esm/worker:196:24)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:825:20)
}
import { PrismaClient } from '@prisma/client';
^^^^^^^^^^^^
SyntaxError: The requested module '@prisma/client' does not provide an export named 'PrismaClient'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:134:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:217:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:123:5)
from import-in-the-middle.
@timfish, could you please let me know when the fix is released? Thank you.
from import-in-the-middle.
Related Issues (20)
- Use `es-module-lexer` to parse ESM
- Doesn't handle exports with invalid identifiers
- `getFullCjsExports` does not resolve re-exports from external dependencies
- Are sequential patched supported? HOT 6
- parentResolve is not a function HOT 1
- Should fail gracefully when exports cannot be parsed
- Explicitly named exports should be exported over `export *` exports HOT 3
- Acorn parser does not support import attributes
- SyntaxError on importing some packages when using register() HOT 14
- SyntaxError when importing a JSON file using { type: 'json' } HOT 3
- import-in-the-middle' failed to wrap 'file:///app/node_modules/@prisma/client/default.js' HOT 2
- iitm wrappers copy exported primitives HOT 1
- Update LICENSE and NOTICE
- Codify governance HOT 2
- Resolve exports for native modules
- Errors when importing vue/server-renderer
- Import in the middle breaks `drizzle-orm` exports HOT 3
- Unable to import from Vue HOT 1
- `release-please` GHA fails due to expired access token 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 import-in-the-middle.