Giter Site home page Giter Site logo

hqjs / hq Goto Github PK

View Code? Open in Web Editor NEW
126.0 6.0 11.0 469 KB

Lightning fast, zero configuration, web application development server

Home Page: https://hqjs.org

License: MIT License

JavaScript 100.00%
static-server build-tool javascript css html assets web development polymer vue

hq's Introduction

πŸ’« One tool to rule them all

hqjs

Features

  • πŸŽ“ You already know it - it is just a static server that delivers your application code files
  • πŸ‚ Zero configuration - one command and you are good to go
  • πŸ‹οΈ Supports all kinds of frameworks: Polymer, Svelte, Vue, React, Angular and many others out of the box
  • 😎 Understands all popular formats .js, .jsx, .mjs, .es6, .svelte, .vue, .ts, .tsx, .coffee, .json, .css, .scss, .sass, .less, .html and .pug
  • 🎁️ Delivers without bundling to reflect project structure in the browser and make it easier to understand and develop
  • πŸ¦‹ Makes debugging a pleasure - NO MORE missing sourcemaps and obfuscated bundles, situations when you can't put a breakpoint on the line or expression, ugly webpack names behind the code and empty debugging tooltips
  • πŸ•Έ Relies on the latest web standards - so you can use cutting edge features even if your browser lacks them
  • ⚑ Light and fast - ships minimum that is required with no bundlers overhead, only the files you change are delivered

VSCode extension

Get Visual Studio Code Extension and run hq with single Go Live button click.

Installation

Install it once with npm

npm install -g @hqjs/hq

Usage

Run inside project root

hq

it will find your source code and serve it.

Make sure that you have nodejs >= 12.10.0 and no unexpected .babelrc, .postcssrc or .posthtmlrc in a project root. If problem occurs - please raise an issue.

Build

You can use hq to prepare your code for regular static server. Type

hq build

in a project root and build result will appear in dist folder. In case hq missed something - you can pass build target as an argument to build command e.g.

hq build src/particle.png

It will do proper tree shaking and consist of both module and nomodule versions.

⚠️ Previous content of dist folder will be erased.

Why hq?

There are many development tools out there, including browserify, webpack, rollup and parcel, that provide development servers. But all of them rely on bundling. While bundling might still be usefull for production, it makes the development experience quite a struggle.

Without bundling hq dramatically increases development speed by shipping only files that were changed and improves debugging by providing minimal transformation to a source.

With hq you can start a new project instantly. Just type hq and you are ready for experiments. It supports all kinds of frameworks out of the box, so there is no need to learn all their different tools and know all the buzzwords.

It is worth to say that hq requires no configuration, offering the familiar experience of working with a regular static server.

How it works

In server mode hq serves every file individually as requested, same way regular static server does. That gives you only very simple dead code elimination without proper tree shaking, but on the other hand a lot of time that was wasted for dependency analysis is being saved. All transforamtions are instant and performed on the fly during the first request. If you use modern browser and stick to the standard your code would hardly be changed at all.

While you try to follow the standards, you can't guarantee that all that libraries that you depend on will do the same. Most of them will probably use commonjs modules format and won't work in the browser just as they are. hq takes care of that as well and transforms commonjs modules into ESM, handles non standard, but pretty common imports (like css or json importing) and destructure importing objects when it is required.

hq will work tightly with the browser, using its cache system to speed up asset delivery and only delivers what has been changed. It will automatically reload the page when you modify the code so you will see the feedback immediatly.

It can work with many different frameworks, but does not rely on any of that frameworks' code in particular. Instead hq performs general ast transformations with babel through plugins that were designed for hq to help it understand all diversity of different technologies and technics used in those frameworks.

Example

Let's say we have an existing angular project and want to improve development experience with hq.

All, we need to do is to add our global style file and script to the head and body of index.html correspondingly. So when hq serves index, it will serve styles and scripts as well

<!doctype html>
<html lang="en">
<head>
  ...
  <link rel="stylesheet" href="/styles.css">
</head>
<body>
  <app-root></app-root>
  <script src="/main.ts"></script>
</body>
</html>

For most of the frameworks that is already enough, and you can skip the next step, but Angular requires a bit more attention. It depends on zones and Reflect.metadata APIs that are on very early stages and are not supported by hq out of the box. In fact angular includes them in file polyfills.ts and adds the file to your build. So we are going to import missing dependencies on top of main.ts

import 'core-js/proposals/reflect-metadata';
import 'zone.js/dist/zone';
import 'zone.js/dist/zone-patch-canvas';
...

And that's it, now you are ready to start developing by running

hq

in the project root.

Is it good for production?

Yes, you can definitely use hq build command to make a production ready build with all necessary optimisations created for you by hq.

Alternatively, you can use hq as a production server for internal projects such as admin panels and dashboards. It will work perfectly with all modern browsers. To activate production mode set NODE_ENV to production before running hq

NODE_ENV=production hq

Does it support HTTP2?

Yes, it does. Drop your certificate and a key somewhere in the root of your project and hq will serve it trough HTTP2 e.g.

cert/server.pem
cert/server-key.pem

For generating self signed certificates check this tool.

More benefits with .babelrc, .postcssrc and .posthtmlrc

With hq you don't need to take care of babel, postcss or posthtml configuration, the latest web standards will be supported out of the box. However if you need to support a feature that does not have a common interpretation (like svg react imports) or experimental features from an early stage (like nested css), or you have your own plugins that only make sense in your project just add .babelrc, .postcssrc or .posthtmlrc configurations to the root of your project with the list of all desired plugins e.g.

.babelrc

{
  "plugins": [
    "babel-plugin-transform-remove-console"
  ]
}

.postcssrc

{
  "plugins": [
    ["postcss-nested", {"preserveEmpty": true}]
  ]
}

.posthtmlrc

{
  "plugins": [
    ["posthtml-doctype", { "doctype" : "HTML 5" }],
    "posthtml-md"
  ]
}

and they will be automatically merged with hq configuration. Do not forget to install these additional plugins to your project before running hq.

License

MIT

hq's People

Contributors

connorlanigan avatar hqjs avatar liqi0816 avatar underoot avatar yuri-karadzhov 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  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

hq's Issues

Lack of documentation

I know the website says "Looking for documentation? You don't need it!", but this is just not acceptable for many readers (including myself).

While the first steps of trying out hq may indeed not require documentation, it's still important to have available for the people who want to understand the overall design of the system, for them to evaluate whether it's designed well.

As it stands, even if hq works out of the box, I lack confidence in it because I don't have enough information to confirm that it's "built well enough" to be robust/flexible for future needs.

It is of course ultimately up to you, but I highly recommend at least having some high-level documentation about the design philosophies, decisions made on the various challenges (and how hq's decisions were different than Webpack, Snowpack, etc.), and a list of advantages and disadvantages of the design approach hq chose to take.

For now I'm going with Snowpack (since it seems to be similar and has more documentation), but hq gaining documentation would definitely interest me in giving hq a closer look.

(Feel free to close this thread of course, if it's not considered worthwhile at this point, or is not specific enough.)

HTTPS/2 Issues

Do you have a guide on how this works?
I have the certs in the right place, but my browser returns this error when trying to open as https
An error occurred during a connection to 172.25.7.63:8080. PR_END_OF_FILE_ERROR

The extension says it should start in https mode automatically, so the Go Live section listing as http://172.25.7.63:8080/ might be an issue?

Curl

❯ curl -k https://172.25.7.63:8080
curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number

this error is indicative of the web server not supporting ssl?

Certs were generated in WSL by mkcert using a hostfile mapping to the IP that hq spits out.

Installation fail

The installation fails when trying to install babel-plugin-minify-dead-code-elimination on windows

Annotation 2020-05-13 114716

npm link doesn't function as expected

///resolve-path.mjs
resolveVendor
    const srcPath = await resolvePackageFrom(ctx.app.root, ctx.dpath, ctx.app.hqroot);
    ctx.srcPath = await fs.realpath(srcPath);
    const stats = await fs.lstat(ctx.srcPath);
    ctx.size = stats.size;
    ctx.dpath = getModulePath(ctx.srcPath);
    ctx.dirname = path.dirname(ctx.dpath);

// utils.mjs
export const getModulePath = filepath => {
  const parts = pathToURL(filepath).split('/node_modules/');
  return `/node_modules/${parts[parts.length - 1]}`;
};

ctx.app.root: '/home/zageron/git/zux'
ctx.dpath: '/node_modules//home/zageron/git/rust/ffrust/pkg/ffrust.js'
ctx.srcPath: '/home/zageron/git/rust/ffrust/pkg/ffrust.js'

Actual path with link: '/home/zageron/git/zux/node_modules/ffrust/ffrust.js'

The path login in HQ is very hard to understand, and I doubt I would be able to resolve this without breaking a lot.

The package.json entry is

    "ffrust": "file:../rust/ffrust/pkg",

I used npm link in ffrust root.
and npm link ffrust in zux root.

Thanks!

Browser support

Please, add support to GNOME WEB as default browser.
Thanks.

Installation fail on both window & docker container

npm install -g @hqjs/hq shows below error:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-04-23T06_22_21_599Z-debug.log

node ver: 14.0.0
test env:

  • windows 10 pro ver 1909
  • node:buster (docker image)

Does not follow symlinks while being used with lerna

Here is the error:

(c) hqjs @ 0.0.7
Start time: 0.7 s
Visit http://localhost:8081
events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: EISDIR: illegal operation on a directory, read
Emitted 'error' event at:
    at fs.read (fs.js:2146:12)
    at FSReqWrap.wrapper [as oncomplete] (fs.js:603:17)

Not working .

Steps to reproduce :

Create a folder and in it execute :

npm init -y;
npm install -g @hqjs/hq;

Then create ./index.html and in it add :

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>
<body>
	hello world
</body>
</html>

then execute :

hq;

and go to the localhost prompted by the terminal .
The web page shows this message :

File / not found
NotFoundError: File / not found
    at Object.throw (/home/lillallol/.nvm/versions/node/v14.5.0/lib/node_modules/@hqjs/hq/node_modules/koa/lib/context.js:97:11)
    at resolveSrc (file:///home/lillallol/.nvm/versions/node/v14.5.0/lib/node_modules/@hqjs/hq/middlewares/resolve-path.mjs:116:31)
    at async file:///home/lillallol/.nvm/versions/node/v14.5.0/lib/node_modules/@hqjs/hq/middlewares/resolve-path.mjs:36:5
    at async cors (/home/lillallol/.nvm/versions/node/v14.5.0/lib/node_modules/@hqjs/hq/node_modules/@koa/cors/index.js:56:32)
    at async file:///home/lillallol/.nvm/versions/node/v14.5.0/lib/node_modules/@hqjs/hq/middlewares/error-handler.mjs:5:5

Live Reload, or Rebuild, doesn't work with WSL

Go Live or hq doesn't actually rebuild the project when making changes and saving.

  • Is any output supposed to show up after hq announce when saving files? I get no output.
❯ hq
(c) hqjs @ 0.0.21
Start time: 0.1 s

Visit http://localhost:8081
or http://172.25.7.63:8081 within local network

Example for equivalent of Vite in hqjs

Questions:

  1. Does hqjs work with vue 3?
  2. Is there example that is the equivalent of Vite but in hqjs?
  3. Is babel (.babelrc) only used in production build (hq build) or also in development (hq)?
  4. Any example on adding code coverage and unit testing that works with hqjs in development mode?

Using a proxy in Angular with hqjs

Our app currently uses a proxy to connect to backend services.
Is it possible to somehow configure this as part of hqjs?
Cos at the moment I would still need to do a ng serve -c proxy

Error start

I start the project.

`<!doctype html>

<script src="js/main.js"></script> `

main.js
console.log('test_hq');

And run command hq

And I get the error
(intermediate value)(intermediate value)(intermediate value) is not iterable TypeError: (intermediate value)(intermediate value)(intermediate value) is not iterable at file:///C:/Users/Serg/AppData/Roaming/npm/node_modules/@hqjs/hq/middlewares/check-support.mjs:27:44 at dispatch (C:\Users\Serg\AppData\Roaming\npm\node_modules\@hqjs\hq\node_modules\koa-compose\index.js:42:32) at file:///C:/Users/Serg/AppData/Roaming/npm/node_modules/@hqjs/hq/middlewares/detect-ua.mjs:46:10 at dispatch (C:\Users\Serg\AppData\Roaming\npm\node_modules\@hqjs\hq\node_modules\koa-compose\index.js:42:32) at cors (C:\Users\Serg\AppData\Roaming\npm\node_modules\@hqjs\hq\node_modules\@koa\cors\index.js:56:38) at dispatch (C:\Users\Serg\AppData\Roaming\npm\node_modules\@hqjs\hq\node_modules\koa-compose\index.js:42:32) at file:///C:/Users/Serg/AppData/Roaming/npm/node_modules/@hqjs/hq/middlewares/error-handler.mjs:5:11 at dispatch (C:\Users\Serg\AppData\Roaming\npm\node_modules\@hqjs\hq\node_modules\koa-compose\index.js:42:32) at C:\Users\Serg\AppData\Roaming\npm\node_modules\@hqjs\hq\node_modules\koa-compose\index.js:34:12 at dispatch (C:\Users\Serg\AppData\Roaming\npm\node_modules\@hqjs\hq\node_modules\koa-compose\index.js:42:32)

My environment:
Edition Windows 10 Home
Version 20H2
Installed on β€Ž09/β€Ž26/β€Ž2020
OS build 19042.804
Experience Windows Feature Experience Pack 120.2212.551.0

NodeJS - v14.13.1
npm - 6.14.8
hq - 0.0.31

Please help me!

What is the right way to use local resolve (like typescript paths)?

What is the suggested way to resolve paths like tsconfig options:

{
"baseUrl": ".",
"paths": {
   "bar": ["packages/bar"]
}
}

Adding babel plugin modules resolver with the above paths causing it to resolve to something like node_modules/packages/bar. I could not find a way to configure the transform paths plugin to ignore those.

Builds broken on windows

Likely the same path issue as before. Luckily ubuntu builds still work so I can just build over there. :)

Ubuntu

❯ npm -g list --depth=0
/home/zageron/.nvm/versions/node/v12.18.4/lib
β”œβ”€β”€ @hqjs/[email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
└── [email protected]
❯ hq build
(c) hqjs @ 0.0.26
Start time: 0.2 s

Visit https://localhost:8080
or https://172.31.211.4:8080 within local network

⬇️  /index.html

πŸ†— /index.html

⬇️  /stylesheets/style.scss

⬇️  /index.ts

πŸ†— /index.ts

⬇️  /render

πŸ†— /stylesheets/style.scss

πŸ†— /render

⬇️  /index.html

πŸ†— /index.html

⬇️  /index.ts

πŸ†— /index.ts

⬇️  /render

πŸ†— /render



πŸ“¦ Bundling for old browsers




βœ… Build successfully completed!

Windows

L:\git\zageron\tinkering>npm -g list --depth=0
C:\Users\Zageron\AppData\Roaming\npm
+-- @hqjs/[email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
L:\git\zageron\tinkering>hq build
(c) hqjs @ 0.0.26
Start time: 0.2 s

Visit http://localhost:8080
or http://192.168.1.239:8080 within local network

⬇️  /index.html

οΏ½ /index.html

⬇️  /L:\stylesheets\style.scss

⬇️  /L:\index.ts

❌ Error /L:/index.ts: File /L:/index.ts not found

NotFoundError: File /L:/index.ts not found
    at Object.throw (C:\Users\Zageron\AppData\Roaming\npm\node_modules\@hqjs\hq\node_modules\koa\lib\context.js:97:11)
    at resolveSrc (file:///C:/Users/Zageron/AppData/Roaming/npm/node_modules/@hqjs/hq/middlewares/resolve-path.mjs:128:21)
    at async file:///C:/Users/Zageron/AppData/Roaming/npm/node_modules/@hqjs/hq/middlewares/resolve-path.mjs:37:5
    at async cors (C:\Users\Zageron\AppData\Roaming\npm\node_modules\@hqjs\hq\node_modules\@koa\cors\index.js:56:32)
    at async file:///C:/Users/Zageron/AppData/Roaming/npm/node_modules/@hqjs/hq/middlewares/error-handler.mjs:5:5

❌ Error /L:/stylesheets/style.scss: File /L:/stylesheets/style.scss not found

NotFoundError: File /L:/stylesheets/style.scss not found
    at Object.throw (C:\Users\Zageron\AppData\Roaming\npm\node_modules\@hqjs\hq\node_modules\koa\lib\context.js:97:11)
    at resolveSrc (file:///C:/Users/Zageron/AppData/Roaming/npm/node_modules/@hqjs/hq/middlewares/resolve-path.mjs:128:21)
    at async file:///C:/Users/Zageron/AppData/Roaming/npm/node_modules/@hqjs/hq/middlewares/resolve-path.mjs:37:5
    at async cors (C:\Users\Zageron\AppData\Roaming\npm\node_modules\@hqjs\hq\node_modules\@koa\cors\index.js:56:32)
    at async file:///C:/Users/Zageron/AppData/Roaming/npm/node_modules/@hqjs/hq/middlewares/error-handler.mjs:5:5

Error: Unable to build /L:\index.ts: Not Found
    at build (file:///C:/Users/Zageron/AppData/Roaming/npm/node_modules/@hqjs/hq/crawl/index.mjs:162:22)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async request (file:///C:/Users/Zageron/AppData/Roaming/npm/node_modules/@hqjs/hq/crawl/index.mjs:115:5)

Error: Unable to build /L:\stylesheets\style.scss: Not Found
    at build (file:///C:/Users/Zageron/AppData/Roaming/npm/node_modules/@hqjs/hq/crawl/index.mjs:162:22)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async request (file:///C:/Users/Zageron/AppData/Roaming/npm/node_modules/@hqjs/hq/crawl/index.mjs:115:5)

⬇️  /index.html

οΏ½ /index.html

⬇️  /L:\index.ts

❌ Error /L:/index.ts: File /L:/index.ts not found

NotFoundError: File /L:/index.ts not found
    at Object.throw (C:\Users\Zageron\AppData\Roaming\npm\node_modules\@hqjs\hq\node_modules\koa\lib\context.js:97:11)
    at resolveSrc (file:///C:/Users/Zageron/AppData/Roaming/npm/node_modules/@hqjs/hq/middlewares/resolve-path.mjs:128:21)
    at async file:///C:/Users/Zageron/AppData/Roaming/npm/node_modules/@hqjs/hq/middlewares/resolve-path.mjs:37:5
    at async cors (C:\Users\Zageron\AppData\Roaming\npm\node_modules\@hqjs\hq\node_modules\@koa\cors\index.js:56:32)
    at async file:///C:/Users/Zageron/AppData/Roaming/npm/node_modules/@hqjs/hq/middlewares/error-handler.mjs:5:5

Error: Unable to build /L:\index.ts: Not Found
    at build (file:///C:/Users/Zageron/AppData/Roaming/npm/node_modules/@hqjs/hq/crawl/index.mjs:162:22)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async request (file:///C:/Users/Zageron/AppData/Roaming/npm/node_modules/@hqjs/hq/crawl/index.mjs:115:5)



οΏ½ Bundling for old browsers



⚠️  Build completed with errors:
    οΏ½ Error: Unable to build /L:\index.ts: Not Found
    οΏ½ Error: Unable to build /L:\stylesheets\style.scss: Not Found
    οΏ½ Error: Unable to build /L:\index.ts: Not Found

Cannot resolve package main

I get this error when trying to start the dev server with

hq

Console error log:

(c) hqjs @ 0.0.21
internal/modules/esm/default_resolve.js:96
  let url = moduleWrapResolve(specifier, parentURL);
            ^

Error: Cannot resolve package main '[object Object]' in/usr/local/lib/node_modules/@hqjs/hq/node_modules/koa/package.json, imported from /usr/local/lib/node_modules/@hqjs/hq/server.mjs
    at Loader.resolve [as _resolve] (internal/modules/esm/default_resolve.js:96:13)
    at Loader.resolve (internal/modules/esm/loader.js:73:33)
    at Loader.getModuleJob (internal/modules/esm/loader.js:147:40)
    at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:41:40)
    at link (internal/modules/esm/module_job.js:40:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Not automatically reloading when modifying SCSS code

When I modify HTML code it automatically reloads but the same does not happen with SCSS, I have to manually refresh the browser to see the changes.

My index.html:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Calendar</title>
    <link href="/favicon.ico" rel="icon" type="image/x-icon" />
    <link rel="stylesheet" type="text/css" href="/main.scss">
</head>
<body>
    test
</body>
</html>

My main.scss:

body {
    background-color: #EEEEEE;
}

I'm on macOS Mojave 10.14.1 and Node.js v11.0.0

Babelrc is being ignoired

Babelrc is being ignored.

// index.mjs
app.babelrc = useBabelRC ? babelRCPath : undefined;
// compilers/js.mjs
extends: ctx.app.babelRC // <-- That should be allined with the name in index.mjs

Invalid filename in shebang line

When I run hq, I always get an error. This error varies slightly, depending on the version of coreutils (which contains the env executable).

Ubuntu 18.04.3 (LTS) (coreutils v8.28):

~ $ hq
/usr/bin/env: β€˜node --experimental-modules --no-warnings’: No such file or directory

Ubuntu 19.04 (coreutils v8.30):

~ $ hq
/usr/bin/env: 'node --experimental-modules --no-warnings': No such file or directory
/usr/bin/env: use -[v]S to pass options in shebang lines

I'm using hq version 0.0.12.

This seems to be caused by the shebang in this file:

hq/index.mjs

Line 1 in 1cd20a0

#!/usr/bin/env node --experimental-modules --no-warnings

From what I found out so far, a shebang can only contain a single parameter. In this case, the string node --experimental-modules --no-warnings is passed as a whole to /usr/bin/env, and since this is not an existing file, it cannot be executed.

A possible solution (as suggested in the second error message) is to use the -S flag, which splits up the argument at the whitespaces. That would look like this:

#!/usr/bin/env -S node --experimental-modules --no-warnings

(Unfortunately, this flag was only introduced in version 8.30 of coreutils, and as such is not present in older Ubuntu versions. However - if I understand correctly - the current version of the script doesn't work on those versions anyway, so there is nothing to lose there.)

Can you confirm if this script works on other Linux versions or on Mac?

Proxy requests for non static files.

Is it possible to proxy requests to a backend, when the file cannot be served by hq?

For example, I would like to proxy requests for PHP files to Apache server.

import destruction from cjs modules

Using [email protected]:

import React, { Component } from "react";

will result into

import * as _ref from "https://localhost:8080/node_modules/react";

const {
  Component
} = _ref;

which is incorrect since, react exports itself as default in the module and therefore * as _ref will give you _ref.default and _ref.default.Component and not _ref.Component.

Error resolving module specifier in raw tsc --init project

Uncaught TypeError: Error resolving module specifier β€œ\render”. Relative module specifiers must start with β€œ./”, β€œ../” or β€œ/”.

typescript 4.0.3
node 12.18.4 or 14.12.0

The most basic of basic typescript projects seem to be broken now. This wasn't broken the last time I was playing with this project.
image

cant install on ubuntu/kde/node 13

lucio@lucio-kde:~/repos/git-fund-me$ npm install -g @hqjs/hq
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
/home/lucio/.nvm/versions/node/v13.14.0/bin/hq -> /home/lucio/.nvm/versions/node/v13.14.0/lib/node_modules/@hqjs/hq/run.js

> [email protected] install /home/lucio/.nvm/versions/node/v13.14.0/lib/node_modules/@hqjs/hq/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v5.0.0/linux-x64-79_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v5.0.0/linux-x64-79_binding.node": 

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g. 

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> [email protected] postinstall /home/lucio/.nvm/versions/node/v13.14.0/lib/node_modules/@hqjs/hq/node_modules/babel-runtime/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> [email protected] postinstall /home/lucio/.nvm/versions/node/v13.14.0/lib/node_modules/@hqjs/hq/node_modules/gifsicle
> node lib/install.js

  ⚠ Response code 404 (Not Found)
  ⚠ gifsicle pre-build test failed
  β„Ή compiling from source
  βœ– Error: Command failed: /bin/sh -c autoreconf -ivf
/bin/sh: 1: autoreconf: not found


    at /home/lucio/.nvm/versions/node/v13.14.0/lib/node_modules/@hqjs/hq/node_modules/bin-build/node_modules/execa/index.js:231:11
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Promise.all (index 0)
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"^10 || ^12 || >=14"} (current: {"node":"13.14.0","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/@hqjs/hq/node_modules/@nicolo-ribaudo/chokidar-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@~2.1.2 (node_modules/@hqjs/hq/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@~2.1.2 (node_modules/@hqjs/hq/node_modules/rollup/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 ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/lucio/.npm/_logs/2020-11-09T02_27_18_437Z-debug.log
lucio@lucio-kde:~/repos/git-fund-me$ hq
hq: command not found
lucio@lucio-kde:~/repos/git-fund-me$ node -v
v13.14.0
lucio@lucio-kde:~/repos/git-fund-me$ uname -a
Linux lucio-kde 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
lucio@lucio-kde:~/repos/git-fund-me$ ^C

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.