Getting error after starting jhipster installation - jhipster

(14/15) Would you like to enable internationalization support? No
? (15/15) Besides JUnit and Karma, which testing frameworks would you like to use? (Press to select, to toggle all, to inverse selection)
events.js:141
throw er; // Unhandled 'error' event
^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode in C:\Users\panka\workspace\Hipster\generator-jhipster\generators\server\templates_README.md while compiling ejs
at Function (native)
at Object.Template.compile (C:\Users\panka\workspace\Hipster\generator-jhipster\node_modules\ejs\lib\ejs.js:495:12)
at Object.compile (C:\Users\panka\workspace\Hipster\generator-jhipster\node_modules\ejs\lib\ejs.js:306:16)
at handleCache (C:\Users\panka\workspace\Hipster\generator-jhipster\node_modules\ejs\lib\ejs.js:169:18)
at Object.exports.render (C:\Users\panka\workspace\Hipster\generator-jhipster\node_modules\ejs\lib\ejs.js:332:10)
at copy.extend.process (C:\Users\panka\workspace\Hipster\generator-jhipster\node_modules\mem-fs-editor\lib\actions\copy-tpl.js:12:18)
at applyProcessingFunc (C:\Users\panka\workspace\Hipster\generator-jhipster\node_modules\mem-fs-editor\lib\actions\copy.js:13:16)
at EditionInterface.exports._copySingle (C:\Users\panka\workspace\Hipster\generator-jhipster\node_modules\mem-fs-editor\lib\actions\copy.js:51:16)
at EditionInterface.exports.copy (C:\Users\panka\workspace\Hipster\generator-jhipster\node_modules\mem-fs-editor\lib\actions\copy.js:23:17)
at EditionInterface.module.exports [as copyTpl] (C:\Users\panka\workspace\Hipster\generator-jhipster\node_modules\mem-fs-editor\lib\actions\copy-tpl.js:10:8)

JHipster only supports the latest NodeJS LTS. Upgrading from v4 to v6 should fix the issue.

Related

svelte/register does not seem to handle imported components from Svelte Material UI

I'm currently having problems with using svelte/register to use imported components.
I've currently been following a tutorial to mess around with NestJS and Svelte.
The tutorial has been good at explaining what's happening and getting a simple NestJS and Svelte app running. However, I'm currently new to both of these things and not understanding why I'm unable to import a components library like Svelte Material UI in to use.
Below is the file that's causing issues:
<script lang="ts">
import IconButton from '#smui/icon-button'; // Commenting this line, makes it work
</script>
<p>blah</p>
And below is the error I get:
(node:29906) UnhandledPromiseRejectionWarning: Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/hypofreak/dev/svelte-nestjs-app/node_modules/#smui/icon-button/dist/index.js
require() of ES modules is not supported.
require() of /home/hypofreak/dev/svelte-nestjs-app/node_modules/#smui/icon-button/dist/index.js from /home/hypofreak/dev/svelte-nestjs-app/src/app/shared/views/nav.svelte is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/hypofreak/dev/svelte-nestjs-app/node_modules/#smui/icon-button/package.json.
at new NodeError (internal/errors.js:322:7)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1102:13)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:93:18)
at Object.<anonymous> (/home/hypofreak/dev/svelte-nestjs-app/src/app/shared/views/nav.svelte:5:33)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.require.extensions.<computed> [as .svelte] (/home/hypofreak/dev/svelte-nestjs-app/node_modules/svelte/register.js:49:17)
at Module.load (internal/modules/cjs/loader.js:950:32)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:29906) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:29906) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I've tried seeing if someone else had the same issues but the problem seems unique to the way the app has been setup.
I can get it working if I comment out the line but I would like to be able to use and import other Svelte components from npm later on if going down this path.
Just learning how to use Svelte and NestJS to understand what's possible at the moment.
Any help or guidance is much appreciated!
Doesn't seem to be possible since svelte/register uses the CommonJS modules recognised by Node.
https://svelte.dev/docs#run-time-svelte-register

when using create-react-app; I get Compiling RuleSet failed Error when running npm start. Query arguments on 'loader' has been removed

While setting up my dev environment for react, I've become unable to get a server to run. I've done fresh re-installs of npm, node, create-react-app, and I get thrown the same error everytime I run npm start.
/Users/sophiamatthews/Desktop/Coding?/7-react-tutorial/node_modules/react-scripts/scripts/start.js:19
throw err;
^
Error: Compiling RuleSet failed: Query arguments on 'loader' has been removed in favor of the 'options' property (at ruleSet[1].rules[0].loader: /Users/sophiamatthews/Desktop/Coding?/7-react-tutorial/node_modules/source-map-loader/dist/cjs.js)
at RuleSetCompiler.error (/Users/sophiamatthews/Desktop/Coding?/7-react-tutorial/node_modules/webpack/lib/rules/RuleSetCompiler.js:373:10)
at /Users/sophiamatthews/Desktop/Coding?/7-react-tutorial/node_modules/webpack/lib/rules/UseEffectRulePlugin.js:160:29
at Hook.eval [as call] (eval at create (/Users/sophiamatthews/Desktop/Coding?/7-react-tutorial/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:49:1)
at RuleSetCompiler.compileRule (/Users/sophiamatthews/Desktop/Coding?/7-react-tutorial/node_modules/webpack/lib/rules/RuleSetCompiler.js:177:19)
at /Users/sophiamatthews/Desktop/Coding?/7-react-tutorial/node_modules/webpack/lib/rules/RuleSetCompiler.js:154:9
at Array.map (<anonymous>)
at RuleSetCompiler.compileRules (/Users/sophiamatthews/Desktop/Coding?/7-react-tutorial/node_modules/webpack/lib/rules/RuleSetCompiler.js:153:16)
at RuleSetCompiler.compileRule (/Users/sophiamatthews/Desktop/Coding?/7-react-tutorial/node_modules/webpack/lib/rules/RuleSetCompiler.js:184:30)
at /Users/sophiamatthews/Desktop/Coding?/7-react-tutorial/node_modules/webpack/lib/rules/RuleSetCompiler.js:154:9
at Array.map (<anonymous>)
This is being done on a new machine that hasn't had any developer tools installed previously.
Not a Duplicate of Error: Compiling RuleSet failed: Query arguments on 'loader' has been removed in favor of the 'options' property
My error occurs in a different file that has a different structure.
7-react-tutorial/node_modules/source-map-loader/dist/cjs.js looks as such
"use strict";
const loader = require("./index");
module.exports = loader.default;
module.exports.raw = loader.raw;

Node Application Crash when sending request

I have been working on a Node application. When i try to run gulp on application , i am facing this error
throw er; // Unhandled 'error' event
^
TypeError: Cannot read property '_id' of null
at passport.conf.js:366:30
at Array.map (native)
at passport.conf.js:364:37
at D:\boibazar-admin_\node_modules\mongoose\lib\model.js:3932:16
at process.nextTick (D:\boibazar-admin_\node_modules\mongoose\lib\query.js:1456:39)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)
[13:54:26] [nodemon] app crashed - waiting for file changes before starting...
It was working perfectly before my windows update. After updating windows (21H1) the application crash all the time when i try to login the system.
Node version of my Application is 6.17.1 and i am using passport-local authentication.
In fornt-end i am using "angular 4". As a new developer in node.js, can anyone help me to sort it out

jhipster entity exception in linux(ubuntu 16.04)

Well, I used command "yo jhipster" to generate a monolithic application, use all the default function.
Use "yo jhipster:entity" to generate a new entity, encounter following error:
events.js:160
throw er; // Unhandled 'error' event
^
Error: Did not provide required argument name!
at constructor.<anonymous> (/home/yhjhoo/IdeaProjects/jhipster_test/jhipster-microservice/test/node_modules/yeoman-generator/lib/base.js:383:33)
at Array.forEach (native)
at constructor.Base.checkRequiredArgs (/home/yhjhoo/IdeaProjects/jhipster_test/jhipster-microservice/test/node_modules/yeoman-generator/lib/base.js:379:19)
at constructor.argument (/home/yhjhoo/IdeaProjects/jhipster_test/jhipster-microservice/test/node_modules/yeoman-generator/lib/base.js:344:8)
at new constructor (/home/yhjhoo/IdeaProjects/jhipster_test/jhipster-microservice/test/node_modules/generator-jhipster/generators/entity/index.js:34:14)
at Environment.instantiate (/usr/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:328:10)
at Environment.create (/usr/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:305:15)
at Environment.run (/usr/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:364:24)
at /usr/lib/node_modules/yo/lib/cli.js:140:11
at Array.forEach (native)
I forgot to provide an entity name, the following command works.
$ yo jhipster:entity person

Node.js and Sphinx concurrent connection issue on Server

I have been using Sphinx Technology for site and implemented in php and Node.js. Using php and Sphinx, so far i didn't get any issues. But with Node.js and Sphinx, i got the following issues rapidly,
1. Error: Error: Connection is opening in OnConnect
at Socket.<anonymous> (/usr/local/lib/node_modules/limestone/limestone.js:217:26)
at Socket.emit (events.js:64:17)
at Object.afterConnect [as oncomplete] (net.js:614:10)
2. node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: write EPIPE
at errnoException (net.js:640:11)
at Object.afterWrite [as oncomplete] (net.js:478:18)
I have been using limestone node.js module as middleware between Node.js and Sphinx server. My assumption is that above error is occured due to the concurrent connection request to Sphinx. If so, then how to avoid the concurrent sphinx request.
Please suggest on the same.
you can try using sphinxql via one of mysql libraries available for sphinx.

Resources