angularjs - Error during npm run start with Angular 4 and Universal -


i have frontend application developed others angular4 application makes call our apis.

i integrate universal in order have seo. important because application ecommerce. followed lot of tutorials, when same on application error.

this tutorial followed: https://coursetro.com/posts/code/68/make-your-angular-app-seo-friendly-(angular-4-+-universal)

when npm run start got error:

error: compilation failed. resource file not found: d:/test/frontend/src/assets/sass/global @ moduleresolutionhostadapter.readresource (d:\test\frontend\node_modules\@angular\compiler-cli\src\compiler_host.js:387:19) @ compilerhost.loadresource (d:\test\frontend\node_modules\@angular\compiler-cli\src\compiler_host.js:250:33) @ object.get (d:\test\frontend\node_modules\@angular\compiler\bundles\compiler.umd.js:25757:107) @ directivenormalizer._fetch (d:\test\frontend\node_modules\@angular\compiler\bundles\compiler.umd.js:14104:43) @ d:\test\frontend\node_modules\@angular\compiler\bundles\compiler.umd.js:14220:68 @ array.map (native) @ directivenormalizer._loadmissingexternalstylesheets (d:\test\frontend\node_modules\@angular\compiler\bundles\compiler.umd.js:14220:14) @ d:\test\frontend\node_modules\@angular\compiler\bundles\compiler.umd.js:14223:26 @ <anonymous> @ process._tickcallback (internal/process/next_tick.js:188:7) compilation failed npm err! code elifecycle npm err! errno 1 npm err! xxx@0.0.0 prestart: `ng build --prod && ngc` npm err! exit status 1 npm err! npm err! failed @ xxx@0.0.0 prestart script. npm err! not problem npm. there additional log ging output above. 

created log says:

0 info worked if ends ok 1 verbose cli [ 'c:\\program files\\nodejs\\node.exe', 1 verbose cli 'c:\\program files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'start' ] 2 info using npm@5.3.0 3 info using node@v8.2.1 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle xxx@0.0.0~prestart: xxx@0.0.0 6 verbose lifecycle xxx@0.0.0~prestart: unsafe-perm in lifecycle true 8 verbose lifecycle xxx@0.0.0~prestart: cwd: d:\test\frontend 9 silly lifecycle xxx@0.0.0~prestart: args: [ '/d /s /c', 'ng build --env=prod && ngc' ] 10 silly lifecycle xxx@0.0.0~prestart: returned: code: 1 signal: null 11 info lifecycle xxx@0.0.0~prestart: failed exec prestart script 12 verbose stack error: xxx@0.0.0 prestart: `ng build --env=prod && ngc` 12 verbose stack exit status 1 12 verbose stack @ eventemitter.<anonymous> (c:\program files\nodejs\node_modules\npm\lib\utils\lifecycle.js:289:16) 12 verbose stack @ emittwo (events.js:125:13) 12 verbose stack @ eventemitter.emit (events.js:213:7) 12 verbose stack @ childprocess.<anonymous> (c:\program files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14) 12 verbose stack @ emittwo (events.js:125:13) 12 verbose stack @ childprocess.emit (events.js:213:7) 12 verbose stack @ maybeclose (internal/child_process.js:921:16) 12 verbose stack @ process.childprocess._handle.onexit (internal/child_process.js:211:5) 13 verbose pkgid xxx@0.0.0 14 verbose cwd d:\test\frontend 15 verbose windows_nt 6.1.7601 16 verbose argv "c:\\program files\\nodejs\\node.exe" "c:\\program files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "start" 17 verbose node v8.2.1 18 verbose npm v5.3.0 19 error code elifecycle 20 error errno 1 21 error xxx@0.0.0 prestart: `ng build --env=prod && ngc` 21 error exit status 1 22 error failed @ xxx@0.0.0 prestart script. 22 error not problem npm. there additional logging output above. 23 verbose exit [ 1, true ] 

i don't know if it's related application or related modifications made integrating universal. doesn't work , don't find online problem.

i tried angular cli 1.1.3, 1.2.7 , 1.3. last 1 should integrate universal support. followed related tutorial here https://github.com/angular/angular-cli/wiki/stories-universal-rendering

but doesn't explain how run entire project. says 2 folders created , there code should used test , output html console, it's not need. need run in browser.

can me please?


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -