Giter Club home page Giter Club logo

cobol-worker-template's Introduction

cobol-worker

A Cloudflare worker that runs COBOL.

src/index.js is the content of the Workers script.

Wrangler

To generate using wrangler

wrangler generate myapp https://github.com/xtuc/cobol-worker-template

To develop your Worker on your local network

npm run dev

To preview your Worker in the browser

npm run preview

To deploy the worker:

npm run deploy

cobol-worker-template's People

Contributors

austincrim avatar everlastingbugstopper avatar lauragift21 avatar notdang avatar rita3ko avatar xtuc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cobol-worker-template's Issues

Template fails to run after setup

After running wrangler generate with this template and running npm run dev, the worker fails with a 500 status code.
Here's the error output:

"A hanging Promise was canceled. This happens when the worker runtime is waiting for a Promise from JavaScript to resolve, but has detected that the Promise cannot possibly ever resolve because all code and events related to the Promise\'s request context have already finished."
[2021-04-08 08:16:22] GET cloud-cobol.austin-crim.workers.dev/ HTTP/1.1 500 Internal Server Error
"Module.instantiateWasm callback failed with error: ReferenceError: wasm is not defined"

environment
macOS: 10.15.7
wrangler: 1.15.0
node: 14.16.0
npm: 6.14.11
docker: 20.10.5

Can't preview it after fresh install

๐Ÿ› Bug Report

Environment

  • operating system: Linux 4.15.0-106-generic #107-Ubuntu SMP Thu Jun 4 11:27:52 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • output of node -v: v12.16.3
  • output of wrangler -V: 1.10.3
  • contents of wrangler.toml
name = "cobol-qsptm"
type = "webpack"
account_id = "[my account_id]"
workers_dev = true
route = ""
zone_id = "[my zone_id]"
webpack_config = "webpack.config.js"

Steps to reproduce

  1. Generate the worker with the template:
    wrangler generate cobol-qsptm https://github.com/xtuc/cobol-worker-template
    cd cobol-qsptm
  2. Optional: setup your account and zone id in wrangler.toml
  3. Preview with wrangler preview :

What did you expect to see?

The preview working

What did you see instead?

npm WARN deprecated [email protected]: no longer maintained
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"<8.10.0"} (current: {"node":"12.16.3","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN @1.0.0 No repository field.

added 358 packages from 219 contributors and audited 360 packages in 13.088s

6 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

 ./src/index.js
Module not found: Error: Can't resolve '../build/out.js' in '/home/master/Documentos/Code/playground/cloudflare/cobol-qsptm/src'
resolve '../build/out.js' in '/home/master/Documentos/Code/playground/cloudflare/cobol-qsptm/src'
  using description file: /home/master/Documentos/Code/playground/cloudflare/cobol-qsptm/package.json (relative path: ./src)
    Field 'browser' doesn't contain a valid alias configuration
    using description file: /home/master/Documentos/Code/playground/cloudflare/cobol-qsptm/package.json (relative path: ./build/out.js)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        /home/master/Documentos/Code/playground/cloudflare/cobol-qsptm/build/out.js doesn't exist
      .wasm
        Field 'browser' doesn't contain a valid alias configuration
        /home/master/Documentos/Code/playground/cloudflare/cobol-qsptm/build/out.js.wasm doesn't exist
      .mjs
        Field 'browser' doesn't contain a valid alias configuration
        /home/master/Documentos/Code/playground/cloudflare/cobol-qsptm/build/out.js.mjs doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        /home/master/Documentos/Code/playground/cloudflare/cobol-qsptm/build/out.js.js doesn't exist
      .json
        Field 'browser' doesn't contain a valid alias configuration
        /home/master/Documentos/Code/playground/cloudflare/cobol-qsptm/build/out.js.json doesn't exist
      as directory
        /home/master/Documentos/Code/playground/cloudflare/cobol-qsptm/build/out.js doesn't exist
[/home/master/Documentos/Code/playground/cloudflare/cobol-qsptm/build/out.js]
[/home/master/Documentos/Code/playground/cloudflare/cobol-qsptm/build/out.js.wasm]
[/home/master/Documentos/Code/playground/cloudflare/cobol-qsptm/build/out.js.mjs]
[/home/master/Documentos/Code/playground/cloudflare/cobol-qsptm/build/out.js.js]
[/home/master/Documentos/Code/playground/cloudflare/cobol-qsptm/build/out.js.json]
 @ ./src/index.js 1:0-32 14:4-6
Error: webpack returned an error. Try configuring `entry` in your webpack config relative to the current working directory, or setting `context = __dirname` in your webpack config.

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.