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

ESM branch: Webpack > babel-loader error on develop and build commands #2

Open
a-kriya opened this issue Feb 5, 2024 · 0 comments
Open

Comments

@a-kriya
Copy link
Owner

a-kriya commented Feb 5, 2024

Description

A sample project exists in gridsome/lib/__tests__/__fixtures__/project-simple which is used as part of e2e test project-simple.build.e2e.js for verifying the build command. With the migration to ESM, the build command and the test currently fails due to a TypeError in the compilation process.

Steps to reproduce

  • git checkout esm
  • cd gridsome/lib/__tests__/__fixtures__/project-simple
  • npm run build

Expected result

A successful build, generating and outputting a single index.html file to dist directory in project-simple, and a passing project-simple.build.e2e.js test.

Actual result

> [email protected] develop
> gridsome develop

Gridsome v0.9.1

Initializing plugins...
Load sources - 0s
Create GraphQL schema - 0.02s
Create pages and templates - 0.01s
Generate temporary code - 0.01s
Bootstrap finish - 0.12s
10% building 0/4 entries 4/4 dependencies 0/4 modulesnode:internal/modules/esm/utils:213
  throw new ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING();
        ^

TypeError [ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING]: A dynamic import callback was not specified.
    at importModuleDynamicallyCallback (node:internal/modules/esm/utils:213:9)
    at Object.<anonymous> (gridsome/node_modules/babel-loader/lib/cache.js:22:23)
    at Object.<anonymous> (gridsome/node_modules/@httptoolkit/esm/esm.js:1:278385)
    at require.Module._extensions (gridsome/node_modules/@httptoolkit/esm/esm.js:1:61)
    at Object._p (gridsome/node_modules/@httptoolkit/esm/esm.js:1:313366)
    at p (gridsome/node_modules/@httptoolkit/esm/esm.js:1:314668)
    at ol (gridsome/node_modules/@httptoolkit/esm/esm.js:1:274743)
    at Object.u (gridsome/node_modules/@httptoolkit/esm/esm.js:1:314916)
    at Object.o (gridsome/node_modules/@httptoolkit/esm/esm.js:1:314316)
    at Object.<anonymous> (gridsome/node_modules/@httptoolkit/esm/esm.js:1:312073) {
  code: 'ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING'
}

Node.js v20.11.0

Environment

Node: 20.11.0 - /opt/homebrew/opt/node@20/bin/node
npm: 10.2.4 - /opt/homebrew/opt/node@20/bin/npm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant