I was able to run the steps in the this link in Mac
When I tried the same example in Windows , I get the below error on npm start.
[at-loader] Ok, 0.216 sec.
Error: spawn UNKNOWN
at _errnoException (util.js:999:13)
at ChildProcess.spawn (internal/child_process.js:340:11)
at exports.spawn (child_process.js:499:9)
at Object.exports.execFile (child_process.js:209:15)
at Object.module.exports.fileCommand (D:\Users\myusername\Projects\apps\testjhispter\node_modules\node-notifier\lib\utils.js:53:13)
at WindowsToaster.notify (D:\Users\myusername\Projects\apps\testjhispter\node_modules\node-notifier\notifiers\toaster.js:65:9)
at module.exports.WebpackNotifierPlugin.compilationDone (D:\Users\myusername\Projects\apps\testjhispter\node_modules\webpack-notifier\index.js:62:18)
at Compiler.applyPlugins (D:\Users\myusername\Projects\apps\testjhispter\node_modules\tapable\lib\Tapable.js:61:14)
at Watching._done (D:\Users\myusername\Projects\apps\testjhispter\node_modules\webpack\lib\Compiler.js:105:17)
at onCompiled (D:\Users\myusername\Projects\apps\testjhispter\node_modules\webpack\lib\Compiler.js:55:18)
at applyPluginsAsync.err (D:\Users\myusername\Projects\apps\testjhispter\node_modules\webpack\lib\Compiler.js:510:14)
at next (D:\Users\myusername\Projects\apps\testjhispter\node_modules\tapable\lib\Tapable.js:202:11)
at D:\Users\myusername\Projects\apps\testjhispter\node_modules\awesome-typescript-loader\src\instance.ts:488:25
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:160:7)
[Browsersync] Proxying: http://localhost:9060
[Browsersync] Access URLs:
-------------------------------------
Local: http://localhost:9000
External: http://10.23.150.12:9000
-------------------------------------
UI: http://localhost:3001
UI External: http://10.23.150.12:3001
-------------------------------------
webpack: wait until bundle finished: /
webpack: wait until bundle finished: /
webpack: wait until bundle finished: /
webpack: wait until bundle finished: /
webpack: wait until bundle finished: /
Windows 10 Enterprise
Node version 9.3.0
NPM version 5.6.0
JHipster version 4.13.0
Installed node LTS version and got the same error again
Error: spawn UNKNOWN
at _errnoException (util.js:1024:11)
at ChildProcess.spawn (internal/child_process.js:323:11)
at exports.spawn (child_process.js:502:9)
at Object.exports.execFile (child_process.js:212:15)
at Object.module.exports.fileCommand (D:\Users\myusername\Projects\apps\testjhipsterlts\node_modules\node-notifier\lib\utils.js:53:13)
at WindowsToaster.notify (D:\Users\myusername\Projects\apps\testjhipsterlts\node_modules\node-notifier\notifiers\toaster.js:65:9)
at module.exports.WebpackNotifierPlugin.compilationDone (D:\Users\myusername\Projects\apps\testjhipsterlts\node_modules\webpack-notifier\index.js:62:18)
at Compiler.applyPlugins (D:\Users\myusername\Projects\apps\testjhipsterlts\node_modules\tapable\lib\Tapable.js:61:14)
at Watching._done (D:\Users\myusername\Projects\apps\testjhipsterlts\node_modules\webpack\lib\Compiler.js:105:17)
at compiler.emitRecords.err (D:\Users\myusername\Projects\apps\testjhipsterlts\node_modules\webpack\lib\Compiler.js:79:19)
at Compiler.emitRecords (D:\Users\myusername\Projects\apps\testjhipsterlts\node_modules\webpack\lib\Compiler.js:371:38)
at compiler.emitAssets.err (D:\Users\myusername\Projects\apps\testjhipsterlts\node_modules\webpack\lib\Compiler.js:62:20)
at applyPluginsAsyncSeries1.err (D:\Users\myusername\Projects\apps\testjhipsterlts\node_modules\webpack\lib\Compiler.js:364:12)
at next (D:\Users\myusername\Projects\apps\testjhipsterlts\node_modules\tapable\lib\Tapable.js:218:11)
at Compiler.compiler.plugin (D:\Users\myusername\Projects\apps\testjhipsterlts\node_modules\webpack\lib\performance\SizeLimitsPlugin.js:99:4)
at next (D:\Users\myusername\Projects\apps\testjhipsterlts\node_modules\tapable\lib\Tapable.js:220:14)
Windows 10 Enterprise Edition
Node 8.9.3
npm 5.6.0
JHipster 4.13.0
Tried installing yarn and using it instead of npm - no luck. I still get the same error
Related
I have an Angular 11.x app that I run using npm run start - this has worked fine for months but all of a sudden it is no longer running the command and I am getting the following errors, can anyone suggest how I fix this? I have tried the obvious ideas of deleting node_modules and reinstalling them using npm install but with no joy.
Below is the error I get after running npm run start - what have I done to break this :(
Compiling #angular/core : es2015 as esm2015
Error: Error on worker #1: TypeError: Cannot read property 'map' of undefined
at injectDependencies (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler/bundles/compiler.umd.js:6960:21)
at compileFactoryFunction (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler/bundles/compiler.umd.js:6888:61)
at Object.compileInjector (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler/bundles/compiler.umd.js:8106:22)
at NgModuleDecoratorHandler.compileFull (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/src/ngtsc/annotations/src/ng_module.js:427:44)
at _loop_2 (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/src/ngtsc/transform/src/compilation.js:595:39)
at NgccTraitCompiler.TraitCompiler.compile (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/src/ngtsc/transform/src/compilation.js:626:21)
at DecorationAnalyzer.compileFile (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/ngcc/src/analysis/decoration_analyzer.js:225:53)
at DecorationAnalyzer.analyzeProgram (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/ngcc/src/analysis/decoration_analyzer.js:164:45)
at Transformer.analyzeProgram (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/ngcc/src/packages/transformer.js:135:57)
at Transformer.transform (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/ngcc/src/packages/transformer.js:77:27)
at ClusterMaster.onWorkerMessage (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/ngcc/src/execution/cluster/master.js:195:27)
at /Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/ngcc/src/execution/cluster/master.js:55:95
at ClusterMaster.<anonymous> (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/ngcc/src/execution/cluster/master.js:293:57)
at step (/Users/zabius/Sites/abc-ui-ng4/node_modules/tslib/tslib.js:143:27)
at Object.next (/Users/zabius/Sites/abc-ui-ng4/node_modules/tslib/tslib.js:124:57)
at /Users/zabius/Sites/abc-ui-ng4/node_modules/tslib/tslib.js:117:75
at new Promise (<anonymous>)
at Object.__awaiter (/Users/zabius/Sites/abc-ui-ng4/node_modules/tslib/tslib.js:113:16)
at EventEmitter.<anonymous> (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular/compiler-cli/ngcc/src/execution/cluster/master.js:287:32)
at EventEmitter.emit (events.js:315:20)
An unhandled exception occurred: NGCC failed.
See "/private/var/folders/b2/1zfdxz293d944p_lxk9_ypz40000gn/T/ng-XQcM3b/angular-errors.log" for further details.
The error in the angular-errors.log file is as follows -
[error] Error: NGCC failed.
at NgccProcessor.process (/Users/zabius/Sites/abc-ui-ng4/node_modules/#ngtools/webpack/src/ngcc_processor.js:129:19)
at /Users/zabius/Sites/abc-ui-ng4/node_modules/#ngtools/webpack/src/angular_compiler_plugin.js:593:31
at SyncHook.eval [as call] (eval at create (/Users/zabius/Sites/abc-ui-ng4/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10$
at SyncHook.lazyCompileHook (/Users/zabius/Sites/abc-ui-ng4/node_modules/webpack/node_modules/tapable/lib/Hook.js:154:20)
at Object.webpack [as webpackFactory] (/Users/zabius/Sites/abc-ui-ng4/node_modules/webpack/lib/webpack.js:55:30)
at createWebpack (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular-devkit/build-webpack/src/webpack-dev-server/index.js:21:36)
at Object.runWebpackDevServer (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular-devkit/build-webpack/src/webpack-dev-server/index.js:47:12)
at SwitchMapSubscriber.project (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular-devkit/build-angular/src/dev-server/index.js:209:32)
at SwitchMapSubscriber._next (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular-devkit/build-angular/node_modules/rxjs/internal/operators/swit$
at SwitchMapSubscriber.Subscriber.next (/Users/zabius/Sites/abc-ui-ng4/node_modules/#angular-devkit/build-angular/node_modules/rxjs/internal/Subs$
at /Users/zabius/Sites/abc-ui-ng4/node_modules/#angular-devkit/build-angular/node_modules/rxjs/internal/util/subscribeToPromise.js:7:24
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Versions :
npm -v 8.1.0
node -v 14.15.4
Using MacOS BigSur 11.5.2
I about to run my protractor test in azure pipeline.
Following steps are success,
npm install
webdriver update
when running "npm run e2e" got below error (highlighted with space),
2020-12-28T11:24:00.1123719Z Date: 2020-12-28T11:24:00.108Z - Hash: 3bfb7dbf8249d8ecd0a9 - Time: 44081ms
2020-12-28T11:24:00.1205386Z ** Angular Live Development Server is listening on localhost:4203, open your browser on http://localhost:4203/ **
2020-12-28T11:24:00.1739298Z [34mℹ[39m [90m「wdm」[39m: Compiled successfully.
2020-12-28T11:24:01.9754480Z [11:24:01] I/launcher - Running 1 instances of WebDriver
2020-12-28T11:24:01.9755656Z [11:24:01] I/direct - Using ChromeDriver directly...
2020-12-28T11:24:06.7970214Z [11:24:06] E/launcher - unknown error: Chrome failed to start: exited abnormally.
2020-12-28T11:24:06.7972134Z (unknown error: DevToolsActivePort file doesn't exist)
2020-12-28T11:24:06.7980054Z (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
2020-12-28T11:24:06.7981720Z (Driver info: chromedriver=87.0.4280.88 (89e2380a3e36c3464b5dd1302349b1382549290d-refs/branch-heads/4280#{#1761}),platform=Linux 4.15.0-1100-azure x86_64)
2020-12-28T11:24:06.7982724Z [11:24:06] E/launcher - WebDriverError: unknown error: Chrome failed to start: exited abnormally.
2020-12-28T11:24:06.7983474Z (unknown error: DevToolsActivePort file doesn't exist)
2020-12-28T11:24:06.7984515Z (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
2020-12-28T11:24:06.7985577Z (Driver info: chromedriver=87.0.4280.88 (89e2380a3e36c3464b5dd1302349b1382549290d-refs/branch-heads/4280#{#1761}),platform=Linux 4.15.0-1100-azure x86_64)
2020-12-28T11:24:06.7986586Z at Object.checkLegacyResponse (/home/vsts/work/1/s/amaze-commerce/node_modules/selenium-webdriver/lib/error.js:546:15)
2020-12-28T11:24:06.7987489Z at parseHttpResponse (/home/vsts/work/1/s/amaze-commerce/node_modules/selenium-webdriver/lib/http.js:509:13)
2020-12-28T11:24:06.7988405Z at doSend.then.response (/home/vsts/work/1/s/amaze-commerce/node_modules/selenium-webdriver/lib/http.js:441:30)
2020-12-28T11:24:06.7988962Z at process._tickCallback (internal/process/next_tick.js:68:7)
2020-12-28T11:24:06.7989391Z From: Task: WebDriver.createSession()
2020-12-28T11:24:06.7990163Z at Function.createSession (/home/vsts/work/1/s/amaze-commerce/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
2020-12-28T11:24:06.7991076Z at Function.createSession (/home/vsts/work/1/s/amaze-commerce/node_modules/selenium-webdriver/chrome.js:761:15)
2020-12-28T11:24:06.7992017Z at Direct.getNewDriver (/home/vsts/work/1/s/amaze-commerce/node_modules/protractor/built/driverProviders/direct.js:77:33)
2020-12-28T11:24:06.7992916Z at Runner.createBrowser (/home/vsts/work/1/s/amaze-commerce/node_modules/protractor/built/runner.js:195:43)
2020-12-28T11:24:06.7993802Z at q.then.then (/home/vsts/work/1/s/amaze-commerce/node_modules/protractor/built/runner.js:339:29)
2020-12-28T11:24:06.8001078Z at _fulfilled (/home/vsts/work/1/s/amaze-commerce/node_modules/q/q.js:834:54)
2020-12-28T11:24:06.8001877Z at /home/vsts/work/1/s/amaze-commerce/node_modules/q/q.js:863:30
2020-12-28T11:24:06.8002782Z at Promise.promise.promiseDispatch (/home/vsts/work/1/s/amaze-commerce/node_modules/q/q.js:796:13)
2020-12-28T11:24:06.8003556Z at /home/vsts/work/1/s/amaze-commerce/node_modules/q/q.js:556:49
2020-12-28T11:24:06.8004307Z at runSingle (/home/vsts/work/1/s/amaze-commerce/node_modules/q/q.js:137:13)
2020-12-28T11:24:06.8005078Z [11:24:06] E/launcher - Process exited with error code 199
2020-12-28T11:24:07.4394944Z npm ERR! code ELIFECYCLE
2020-12-28T11:24:07.4395828Z npm ERR! errno 1
2020-12-28T11:24:07.4462731Z npm ERR! amaze-commerce#1.0.0 e2etest: `node --max_old_space_size=35000 ./node_modules/#angular/cli/bin/ng e2e`
2020-12-28T11:24:07.4465097Z npm ERR! Exit status 1
2020-12-28T11:24:07.4468705Z npm ERR!
2020-12-28T11:24:07.4472803Z npm ERR! Failed at the amaze-commerce#1.0.0 e2etest script.
2020-12-28T11:24:07.4475619Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-12-28T11:24:07.4546066Z
2020-12-28T11:24:07.4546683Z npm ERR! A complete log of this run can be found in:
2020-12-28T11:24:07.4547625Z npm ERR! /home/vsts/.npm/_logs/2020-12-28T11_24_07_448Z-debug.log
2020-12-28T11:24:07.4656714Z ##[error]Bash exited with code '1'.
2020-12-28T11:24:07.4737893Z ##[section]Finishing: run e2e test
Please help me on this issue.
Thanks in Advance.
Add below chromeOptions in protractor.conf file
capabilities: {
browserName: 'chrome',
chromeOptions: {
args: ['--disable-gpu', '--no-sandbox','--headless', '--disable-extensions', '--disable-dev-shm-usage']
}
--disable-dev-shm-usage : overcome limited resource problems
// The /dev/shm partition is too small in certain VM environments, causing
// Chrome to fail or crash (see http://crbug.com/715363). Use disable-dev-shm-usage flag to
// work-around this issue (a temporary directory will always be used to create
// anonymous shared memory files).
I'm working on an angular 2 app and for that I've configured protractor for end-2-end testing. but when I try to run the test cases, I get the following error
[11:53:45] I/local - Starting selenium standalone server...
[11:53:45] I/launcher - Running 1 instances of WebDriver
[11:53:45] E/launcher - Server terminated early with status 2
[11:53:45] E/launcher - Error: Server terminated early with status 2
at Error (native)
at C:\Users\Dell\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\remote\index.js:242:20
at ManagedPromise.invokeCallback_ (C:\Users\Dell\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1379:14)
at TaskQueue.execute_ (C:\Users\Dell\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2913:14)
at TaskQueue.executeNext_ (C:\Users\Dell\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2896:21)
at asyncRun (C:\Users\Dell\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2775:27)
at C:\Users\Dell\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:639:7
at process._tickCallback (internal/process/next_tick.js:109:7)
[11:53:45] E/launcher - Process exited with error code 199
webdriver-manager version: 10.3.0
node version: 6.11.0
npm version: 3.8.6
protractor version: 4.0.9
Environment: Windows
I've searched the web but unable to find solution for the issue. Any help would be appreciated. Thanks
I'm on Windows 10 recently upgraded my node.js to version 7.1.0. I started to get the following error every time I ran the webpack command with --progress flag.
$ webpack --progress
Node Environment: development events.js:160
throw er; // Unhandled 'error' event
^
Error: write EINVAL
at exports._errnoException (util.js:1022:11)
at WriteStream.Socket._writeGeneric (net.js:715:26)
at WriteStream.Socket._write (net.js:734:8)
at doWrite (_stream_writable.js:334:12)
at writeOrBuffer (_stream_writable.js:320:5)
at WriteStream.Writable.write (_stream_writable.js:247:11)
at WriteStream.Socket.write (net.js:661:40)
at E:\Projects\wad\node_modules\webpack\bin\convert-argv.js:421:20
at Compiler.<anonymous> (E:\Projects\wad\node_modules\webpack\lib\ProgressPlugin.js:77:4)
at Compiler.applyPlugins (E:\Projects\wad\node_modules\tapable\lib\Tapable.js:26:37)
at Compiler.<anonymous> (E:\Projects\wad\node_modules\webpack\lib\Compiler.js:193:12)
at Compiler.emitRecords (E:\Projects\wad\node_modules\webpack\lib\Compiler.js:282:37)
at Compiler.<anonymous> (E:\Projects\wad\node_modules\webpack\lib\Compiler.js:187:11)
at E:\Projects\wad\node_modules\webpack\lib\Compiler.js:275:11
at Compiler.applyPluginsAsync (E:\Projects\wad\node_modules\tapable\lib\Tapable.js:60:69)
at Compiler.afterEmit (E:\Projects\wad\node_modules\webpack\lib\Compiler.js:272:8)
at Compiler.<anonymous> (E:\Projects\wad\node_modules\webpack\lib\Compiler.js:267:14)
at E:\Projects\wad\node_modules\async\lib\async.js:52:16
at done (E:\Projects\wad\node_modules\async\lib\async.js:246:17)
at E:\Projects\wad\node_modules\async\lib\async.js:44:16
at E:\Projects\wad\node_modules\graceful-fs\graceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:111:15)
It works fine without the --progress flag and webpack --progress was working fine on node.js v6.x.x. Using webpack --progress with node v.7.1.0 on the same project but another windows 10 machine also works fine.
What does this error mean?
This is a problem of the version node, use the version 6.9 and success
I had the same problem, and i uninstall node7.1, reboot and install node6.9 and all ok
It seems there a bug at node js v7.1.0 nodejs/node#9542. Update to the latest version v7.3.0 and everything will be ok.
I need help please!
I have been able to effortlessly install and run all previous versions of the PSK. I have spent hours now trying to get 1.1.0 to run in my environment. I have done everything I can think of. From googling the error to reviewing all current issues with this version here. Any of the suggested fixes dont work for me.
I have made no code changes and I am running CMD as the Admin.
When I grab a fresh copy of the repository and do the NPM & Bower installs, then run "gulp serve" I get the following error no matter what:
C:\FrontEnd\polymer-starter-kit>gulp serve
[09:45:33] Using gulpfile C:\FrontEnd\polymer-starter-kit\gulpfile.js
[09:45:33] Starting 'styles'...
[09:45:33] Starting 'elements'...
[09:45:33] Starting 'images'...
[09:45:33] Finished 'elements' after 249 ms
[09:45:33] styles all files 98 B
[09:45:33] Finished 'styles' after 590 ms
[09:45:34] images all files 35.41 kB
[09:45:34] Finished 'images' after 357 ms
[09:45:34] Starting 'serve'...
[09:45:34] Finished 'serve' after 73 ms
[PSK] Access URLs:
------------------------------------
Local: http://localhost:5000
External: http://xxx.xxx.x.x:5000
------------------------------------
UI: http://localhost:3001
UI External: http://xxx.xxx.x.x:3001
------------------------------------
[PSK] Serving files from: .tmp
[PSK] Serving files from: app
events.js:141
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
at exports._errnoException (util.js:837:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at doNTCallback2 (node.js:429:9)
at process._tickCallback (node.js:343:17)
My Environment:
All Required Prerequisites
Windows 10
Node.js v4.1.1
NPM v3.3.4
Bower v1.5.3
I am also not sure how to get a more detailed stack trace.
What should I do?
Thanks for the help!
It turns out I needed to add C:\Windows\System32 to my PATH vars. So strange. When I did that everything work like a charm.