I have successfully completed the bookstore application and It's been running so far. I wanted to package the application in an WAR file and have it run of a different machine/environment.
Environment:
Windows 7
JDK 8
Maven 3.3.9
NodeJS 5.3
I run the following command
mvn -Pprod package
Issue #1 - Bower execution failed, resolved by updating git config for https:// instead of git://
Issue #2 -Python related errors - Do I need to setup Python?
C:\Source\jhipster-projects\bookstore1\node_modules\utf-8-validate>if not defined npm_config_node_gyp
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
Issue #3 - PhantomJS related errors, I did update PhantomJS still with the same errors
PhantomJS 1.9.8 (Windows 7 0.0.0): Executed 46 of 46 SUCCESS (34.659 secs / 1.536 secs)
←[1A←[2KPhantomJS 1.9.8 (Windows 7 0.0.0): Executed 46 of 46 SUCCESS (34.659 secs / 1.536 secs)
Missing error handler on `socket`.
TypeError: sockets.forEach is not a function
at disconnectBrowsers (C:\Source\jhipster- projects\bookstore1\node_modules\karma\lib\server.js:314:13)
at null.<anonymous> (C:\Source\jhipster- projects\bookstore1\node_modules\karma\lib\server.js:291:7)
at emitTwo (events.js:92:20)
at emit (events.js:172:7)
at emitRunCompleteIfAllBrowsersDone (C:\Source\jhipster- projects\bookstore1\node_modules\karma\lib\server.js:256:12)
at null.<anonymous> (C:\Source\jhipster-projects\bookstore1\node_modules\karma\lib\server.js:278:9)
at emitTwo (events.js:92:20)
at emit (events.js:172:7)
at onComplete (C:\Source\jhipster-projects\bookstore1\node_modules\karma\lib\browser.js:142:13)
at Socket.<anonymous> (C:\Source\jhipster-projects\bookstore1\node_modules\karma\lib\events.js:13:22)
at emitTwo (events.js:92:20)
at Socket.emit (events.js:172:7)
at Socket.onevent (C:\Source\jhipster- projects\bookstore1\node_modules\socket.io\lib\socket.js:335:8)
at Socket.onpacket (C:\Source\jhipster- projects\bookstore1\node_modules\socket.io\lib\socket.js:295:12)
at Client.ondecoded (C:\Source\jhipster-projects\bookstore1\node_modules\socket.io\lib\client.js:193:14)
at Decoder.Emitter.emit (C:\Source\jhipster-projects\bookstore1\node_modules\component-emitter\index.js:134:20)
Thanks
It looks that this issue has been resolved a few hours ago in Karma v0.13.19:
https://github.com/karma-runner/karma/releases/tag/v0.13.19
https://github.com/jhipster/generator-jhipster/issues/2574
Not sure if you fixed it already, but Chris's answer was right. The Karma module needs to be updated in package.json for your project since it specifies which exact version to use, and won't use the newer version that you installed globally.
Change
"karma": "0.13.15",
to
"karma": "0.13.19",
then, run npm install
Related
I'm struggling for hours but don't know why I'm getting this on webpack compile command node version 12
ERROR in ./node_modules/css-loader??ref--8-2!./node_modules/postcss-loader/lib??postcss!./node_modules/resolve-url-loader??ref--8-4!./node_modules/sass-loader/lib/loader.js??ref--8-5!./resources/assets/sass/main.scss
Module build failed:
font-weight: $font-weight-bolder; // Add the correct font weight in Chrome, Edge, and Safari
^
Undefined variable: "$font-weight-bolder".
in /www/wwwroot/ship-hero.codersarray.com/node_modules/bootstrap/scss/_reboot.scss (line 158, column 16)
# ./resources/assets/sass/main.scss 4:14-267
# multi ./resources/assets/js/pages/install.js ./resources/assets/sass/main.scss
ERROR in ./resources/assets/sass/main.scss
Module build failed: ModuleBuildError: Module build failed:
font-weight: $font-weight-bolder; // Add the correct font weight in Chrome, Edge, and Safari
^
Undefined variable: "$font-weight-bolder".
in /www/wwwroot/ship-hero.codersarray.com/node_modules/bootstrap/scss/_reboot.scss (line 158, column 16)
at /www/wwwroot/ship-hero.codersarray.com/node_modules/webpack/lib/NormalModule.js:195:19
at /www/wwwroot/ship-hero.codersarray.com/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /www/wwwroot/ship-hero.codersarray.com/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/www/wwwroot/ship-hero.codersarray.com/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at Object.callback (/www/wwwroot/ship-hero.codersarray.com/node_modules/sass-loader/lib/loader.js:55:13)
at Object.done [as callback] (/www/wwwroot/ship-hero.codersarray.com/node_modules/neo-async/async.js:8069:18)
at options.error (/www/wwwroot/ship-hero.codersarray.com/node_modules/node-sass/lib/index.js:294:32)
# ./resources/assets/sass/main.scss
# multi ./resources/assets/js/pages/install.js ./resources/assets/sass/main.scss
I already fixed it here is the solution if anyone encounters the same problem the issue is with the bootstrap version according to package.json bootstrap version is ^4.0.0 but on running npm install 4.6 version is being installed that is causing the issue so I just install the specific version that is 4.0.0 changed the value in the package.json from ^4.0.0 to 4.0.0.
When running ng serve I get the following error after updating my angular version:
An unhandled exception occurred: Directory import 'C:\Users\xxx\Documents\desktop-server-client-app\desktop\server\client\node_modules\#angular-devkit\build-angular\src\dev-server' is not supported
resolving ES modules imported from C:\Users\xxx\Documents\desktop-server-client-app\desktop\server\client\node_modules\#angular\cli\node_modules\#angular-devkit\architect\node\node-modules-architect-host.js
Did you mean to import C:/Users/xxx/Documents/desktop-server-client-app/desktop/server/client/node_modules/#angular-devkit/build-angular/src/dev-server/index.js?
See "C:\Users\xxx\AppData\Local\Temp\ng-TMJqg5\angular-errors.log" for further details.
Log output:
[error] Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import 'C:\Users\xxx\Documents\desktop-server-client-app\desktop\server\client\node_modules\#angular-devkit\build-angular\src\dev-server' is not supported resolving ES modules imported from C:\Users\xxx\Documents\desktop-server-client-app\desktop\server\client\node_modules\#angular\cli\node_modules\#angular-devkit\architect\node\node-modules-architect-host.js
Did you mean to import C:/Users/xxx/Documents/desktop-server-client-app/desktop/server/client/node_modules/#angular-devkit/build-angular/src/dev-server/index.js?
at finalizeResolution (internal/modules/esm/resolve.js:272:17)
at moduleResolve (internal/modules/esm/resolve.js:699:10)
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:810:11)
at Loader.resolve (internal/modules/esm/loader.js:85:40)
at Loader.getModuleJob (internal/modules/esm/loader.js:229:28)
at Loader.import (internal/modules/esm/loader.js:164:28)
at importModuleDynamically (internal/modules/cjs/loader.js:1006:27)
at exports.importModuleDynamicallyCallback (internal/process/esm_loader.js:30:14)
at eval (eval at loadEsmModule (C:\Users\xxx\Documents\desktop-server-client-app\desktop\server\client\node_modules\#angular\cli\node_modules\#angular-devkit\architect\node\node-modules-architect-host.js:195:12), <anonymous>:3:1)
at loadEsmModule (C:\Users\xxx\Documents\desktop-server-client-app\desktop\server\client\node_modules\#angular\cli\node_modules\#angular-devkit\architect\node\node-modules-architect-host.js:195:68)
Could somebody explain to me what this error means and how I could fix it? It seems to me that this is some kind of compatibility problem I can't do much about. My angular project so far just contains some boilerplate code, so it shouldn't be the problem.
Edit: My versions are the following:
Node: 14.15.0
npm: 6.14.8
Angular: 13.2.4
#angular-devkit/architect: 0.1202.16
#angular-devkit/build-angular: 12.2.16
#angular-devkit/core: 12.2.16
#angular-devkit/schematics: 13.2.5
#angular/cdk: 12.2.13
#angular/cli: 13.2.5
#angular/material: 12.2.13
#schematics/angular: 13.2.5
rxjs: 6.6.7
typescript: 4.5.5
I faced this problem because I updated my project to Angular 13 using --legacy-peer-deps flag. Because of that, there were old dependencies still present in package.json.
Make sure you have the appropriate package version regarding the thrown error. In your precise case, try to change
"#angular-devkit/build-angular": "~12.2.16"
to "#angular-devkit/build-angular": "~13.2.5"
then run npm install.
Normally in NPM you can install a package under an alias, like so:
npm i alias#npm:real-package-name
For reference, here's where the aliasing feature was announced: https://npm.community/t/release-npm-6-9-0/5911
b7b54f2d1 413 #3 530 Add support for package aliases. This allows packages to be installed under a different directory than the package name listed in package.json, and adds a new dependency type to allow this to be done for registry dependencies. (#zkat 50)
This allows you to import/require the package using its alias instead of its real name:
import foo from 'alias'
However, when I try to do this with the ESM-bundled version of Chai:
npm i --save-dev chai#npm:bundled-es-modules/chai
I get the error "aliases only work for registry deps" ... but I can't find any information about what that error actually means at all. Here's the full stack trace:
25 verbose stack Error: aliases only work for registry deps
25 verbose stack at fromAlias (/usr/local/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:270:11)
25 verbose stack at resolve (/usr/local/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:70:12)
25 verbose stack at npa (/usr/local/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:52:10)
25 verbose stack at /usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:406:31
25 verbose stack at Array.map (<anonymous>)
25 verbose stack at Arborist.[add] (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:405:28)
25 verbose stack at Arborist.[applyUserRequests] (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:390:23)
25 verbose stack at Arborist.buildIdealTree (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:207:37)
25 verbose stack at async Promise.all (index 1)
25 verbose stack at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/reify.js:123:5)
Can anyone explain what this error means, and why I can't alias that package (or if I can, what I'm doing wrong)?
I assume that you are wanting to alias this namespaced/scoped package #bundled-es-modules/chai during installation.
In which case add the # symbol prefix to the package <name> part of your install command. e.g.
npm i --save-dev chai#npm:#bundled-es-modules/chai
^
The npm-install docs provide the following synopsis for the alias command:
npm install <alias>#npm:<name>
Essentially, the # prefix for a scoped package is part of the package <name>.
I've encountered following error when I run my code,
Error: /var/www/courses.com.mm/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs: 1: /var/www/mysite.com.mm/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs: Syntax error: Unterminated quoted string
at Socket.onStderr (/var/www/mysite.com.mm/node_modules/phridge/lib/spawn.js:93:28)
at emitOne (events.js:101:20)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at Pipe.onread (net.js:547:20)
Please let me know how to solve it. Thanks.
See the following issues on GitHub:
https://github.com/Medium/phantomjs/issues/392
https://github.com/Medium/phantomjs/issues/384
It seems you have installed the binary on 1 platform and run them on another. According to docs NPM expects you to run npm rebuild if you switch platforms, to rebuild any platform-specific dependencies.
see also https://github.com/Medium/phantomjs#cross-platform-repositories for more information.
I'm trying to run haskell code using stack ghci, but I am having this problem where stack build, stack ghci, stack anything except init (which runs fine), hangs pretty indefinitely.
Oh and this is on windows 10, running a stack I just downloaded last week. Here's the verbose output of the command it seems to get stuck on when I run stack ghci:
2016-06-12 17:22:46.134672: [debug] Run process:
C:\...\stack\setup-exe-cache\x86_64-windows\setup-Simple-Cabal-1.22.5.0-ghc-7.10.3.exe
--builddir=.stack-work\dist\2672c1f3
configure
--with-ghc=C:\...\stack\x86_64-windows\ghc-7.10.3\bin\ghc.exe
--with-ghc-pkg=C:\...\stack\x86_64-windows\ghc-7.10.3\bin\ghc-pkg.exe
--user
--package-db=clear
--package-db=global
--package-db=C:\...\stack\snapshots\ee4b7647\pkgdb
--package-db=C:\...\mp1-haskell\.stack-work\install\5c0a1b09\pkgdb
--libdir=C:\...\mp1-haskell\.stack-work\install\5c0a1b09\lib
--bindir=C:\...\mp1-haskell\.stack-work\install\5c0a1b09\bin
--datadir=C:\...\assignments\mp1-haskell\.stack-work\install\5c0a1b09\share
--libexecdir=C:\...\mp1-haskell\.stack-work\install\5c0a1b09\libexec
--sysconfdir=C:\...\mp1-haskell\.stack-work\install\5c0a1b09\etc
--docdir=C:\...\mp1-haskell\.stack-work\install\5c0a1b09\doc\mp1-haskell-0.1.0.0
--htmldir=C:\...\mp1-haskell\.stack-work\install\5c0a1b09\doc\mp1-haskell-0.1.0.0
--haddockdir=C:\...\mp1-haskell\.stack-work\install\5c0a1b09\doc\mp1-haskell-0.1.0.0
--dependency=base=base-4.8.2.0-14035a44a8b95c6832da6dae1420f59e
--extra-include-dirs=C:\...\stack\x86_64-windows\msys2-20150512\mingw64\include
--extra-lib-dirs=C:\...\stack\x86_64-windows\msys2-20150512\mingw64\lib
--enable-tests
--enable-benchmarks #(stack_9kewhubnl5WIl89fhd1ea2:System.Process.Read src/System\Process\Read.hs:283:3)