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

node compat Error: Not implemented: createContext #18299

Closed
MarybethGasman opened this issue Mar 21, 2023 · 3 comments · Fixed by #23202
Closed

node compat Error: Not implemented: createContext #18299

MarybethGasman opened this issue Mar 21, 2023 · 3 comments · Fixed by #23202

Comments

@MarybethGasman
Copy link
Contributor

MarybethGasman commented Mar 21, 2023

When running webpack with html-webpack-plugin, I encountered an error.
I think it's related to the method here
Are there any plans to implement this method?

deno: 1.31.3
Windows NT 10.0; Win64; x64

package.json

{
  "name": "js-demo",
  "version": "1.0.0",
  "description": "",
  "main": "code.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "build" : "webpack",
  },

  "devDependencies" : {
    "webpack": "^5.76.2",
    "webpack-cli": "^5.0.1",
    "html-webpack-plugin": "^5.5.0"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}

webpack.config.js

const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
    mode: 'development',
    entry: path.join(__dirname, 'src', 'index.js'),
    output: {
        filename: 'bundle.[contenthash].js',
        path: path.join(__dirname, 'dist')
    },
    plugins: [
        new HtmlWebpackPlugin()
    ]
}

error message

ERROR in   Error: Not implemented: createContext   
  - _utils.ts:7 notImplemented
    ext:deno_node/_utils.ts:7:11
  - vm.ts:23 Object.createContext
    ext:deno_node/vm.ts:23:5
  - index.js:130 HtmlWebpackPlugin.evaluateCompilationResult   
    [js-demo]/[html-webpack-plugin@5.5.0]/[html-webpack-plugin]    /index.js:130:26
  - index.js:324
    [js-demo]/[html-webpack-plugin@5.5.0]/[html-webpack-plugin]    /index.js:324:26
  - 01_core.js:406 Object.runMicrotasks
    ext:core/01_core.js:406:30
  - _next_tick.ts:51 processTicksAndRejections
    ext:deno_node/_next_tick.ts:51:14
  - _next_tick.ts:69 runNextTicks
    ext:deno_node/_next_tick.ts:69:5
  - async Promise.all
  - async Promise.all
@MarybethGasman MarybethGasman changed the title Error: Not implemented: createContext node compat Error: Not implemented: createContext Mar 25, 2023
@tian-sheng-low
Copy link

Hi, I also ran into the same issue.
By reading #18315, it seems that vm will not be supported in the near future.
Looking for some heads up :)

@vwkd
Copy link
Contributor

vwkd commented Nov 9, 2023

Ran into this while trying to get temporal to run with deno.

Steps To Reproduce:

  1. Download the fetch-esm example.
  2. Add node: to node imports
  3. Change .js to .ts in imports
  4. Run deno run src/worker.ts and accept all permissions.

@birkskyum
Copy link
Contributor

@vwkd , does this work for you now?

satyarohith pushed a commit that referenced this issue Apr 11, 2024
Implement contextified objects in `node:vm`

Fixes #23186
Fixes #22395
Fixes #20607
Fixes #18299
Fixes #19395
Fixes #18315
Fixes #18319
Fixes #23183
littledivy added a commit to littledivy/deno that referenced this issue Apr 19, 2024
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

Successfully merging a pull request may close this issue.

4 participants