Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix that GenerateSeedDB.ts is failing to run (due to the ever-annoying fragility of commonjs/esm import mismatching...) #241

Open
Venryx opened this issue Oct 10, 2023 · 0 comments
Labels
good first issue Good issue for new contributors to get started with

Comments

@Venryx
Copy link
Collaborator

Venryx commented Oct 10, 2023

Error:

file:///C:/Root/Apps/@V/DebateMap/Main/.yalc/web-vcore/.yalc/mobx-graphlink/Dist/Tree/QueryParams.js:1
import { gql } from "@apollo/client";
         ^^^
SyntaxError: Named export 'gql' not found. The requested module '@apollo/client' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@apollo/client';
const { gql } = pkg;

    at ModuleJob._instantiate (internal/modules/esm/module_job.js:120:21)
    at async ModuleJob.run (internal/modules/esm/module_job.js:165:5)
    at async Loader.import (internal/modules/esm/loader.js:177:24)
    at async Object.loadESM (internal/process/esm_loader.js:68:5)
The script called "db.buildSeedDBScript" which runs "cross-env TS_NODE_SKIP_IGNORE=true TS_NODE_PROJECT=./Scripts/SeedDBGenerator/tsconfig.json TS_NODE_TRANSPILE_ONLY=true  node --loader ts-node/esm.mjs --experimental-specifier-resolution=node ./Scripts/SeedDBGenerator/GenerateSeedDB.ts" failed with exit code 1 https://github.com/sezna/nps/blob/master/other/ERRORS_AND_WARNINGS.md#failed-with-exit-code
@Venryx Venryx changed the title Fix that GenerateSeedDB.ts is failing to run (due to the every-annoying fragility of commonjs/esm import mismatching...) Fix that GenerateSeedDB.ts is failing to run (due to the ever-annoying fragility of commonjs/esm import mismatching...) Dec 7, 2023
@Venryx Venryx added the good first issue Good issue for new contributors to get started with label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good issue for new contributors to get started with
Projects
Status: 🔖 Short-term (Venryx)
Development

No branches or pull requests

1 participant