Title: Universal server bundle is not working properly · Issue #7200 · angular/angular-cli · GitHub
Open Graph Title: Universal server bundle is not working properly · Issue #7200 · angular/angular-cli
X Title: Universal server bundle is not working properly · Issue #7200 · angular/angular-cli
Description: Bug Report or Feature Request (mark with an x) - [x] bug report -> please search issues before submitting - [ ] feature request Versions. @angular/cli: 1.3.0-rc.1 node: 6.10.3 os: darwin x64 Repro steps. Follow these steps here: https://...
Open Graph Description: Bug Report or Feature Request (mark with an x) - [x] bug report -> please search issues before submitting - [ ] feature request Versions. @angular/cli: 1.3.0-rc.1 node: 6.10.3 os: darwin x64 Repro ...
X Description: Bug Report or Feature Request (mark with an x) - [x] bug report -> please search issues before submitting - [ ] feature request Versions. @angular/cli: 1.3.0-rc.1 node: 6.10.3 os: darwin x64 Rep...
Opengraph URL: https://github.com/angular/angular-cli/issues/7200
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Universal server bundle is not working properly","articleBody":"### Bug Report or Feature Request (mark with an `x`)\r\n```\r\n- [x] bug report -> please search issues before submitting\r\n- [ ] feature request\r\n```\r\n\r\n### Versions.\r\n@angular/cli: 1.3.0-rc.1\r\nnode: 6.10.3\r\nos: darwin x64\r\n\r\n\r\n### Repro steps.\r\n\r\nFollow these steps here:\r\n\r\nhttps://github.com/angular/angular-cli/wiki/stories-universal-rendering\r\n\r\nAdd https://github.com/ngx-translate/core to the app.\r\n\r\nBuild a server bundle.\r\n\r\nTest it and you will see the error below.\r\n\r\n### The log given by the failure.\r\n\r\n```\r\n\u003csome-excluded-path>/ng-boilerplate/node_modules/@ngx-translate/core/src/translate.store.js:1\r\n(function (exports, require, module, __filename, __dirname) { import { EventEmitter } from \"@angular/core\";\r\n ^^^^^^\r\nSyntaxError: Unexpected token import\r\n at createScript (vm.js:56:10)\r\n at Object.runInThisContext (vm.js:97:10)\r\n at Module._compile (module.js:542:28)\r\n at Object.Module._extensions..js (module.js:579:10)\r\n at Module.load (module.js:487:32)\r\n at tryModuleLoad (module.js:446:12)\r\n at Function.Module._load (module.js:438:3)\r\n at Module.require (module.js:497:17)\r\n at require (internal/module.js:20:19)\r\n at Object.17 (\u003csome-excluded-path>/ng-boilerplate/dist-server/main.75d7fa7aeab5f9b24f61.bundle.js:1:6560)\r\n at e (\u003csome-excluded-path>/ng-boilerplate/dist-server/main.75d7fa7aeab5f9b24f61.bundle.js:1:149)\r\n at Object.2cGb (\u003csome-excluded-path>/chrillewoodz/ng-boilerplate/dist-server/main.75d7fa7aeab5f9b24f61.bundle.js:1:7952)\r\n at e (\u003csome-excluded-path>/ng-boilerplate/dist-server/main.75d7fa7aeab5f9b24f61.bundle.js:1:149)\r\n at Object.Zq8w (\u003csome-excluded-path>/ng-boilerplate/dist-server/main.75d7fa7aeab5f9b24f61.bundle.js:1:28947)\r\n at e (\u003csome-excluded-path>/ng-boilerplate/dist-server/main.75d7fa7aeab5f9b24f61.bundle.js:1:149)\r\n```\r\n\r\n\r\n### Desired functionality.\r\nBasically the issue here is that node is resolving the wrong module. It's looking inside of the `node_modules` folder instead of in the `vendor` file in the server bundle.\r\n\r\n### Mention any other details that might be useful.\r\n\r\nYou can download a project with these steps already done:\r\n\r\nhttps://github.com/chrillewoodz/ng-boilerplate/tree/universal\r\n\r\nSo simply run `npm run universal` and you will see the error.\r\n\r\n","author":{"url":"https://github.com/chrillewoodz","@type":"Person","name":"chrillewoodz"},"datePublished":"2017-07-29T11:55:40Z","url":"https://github.com/angular/angular-cli/issues/7200"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:dba233d8-b73f-27f6-9c55-8eb9eb3de4d0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AA52:2DA781:BB26BC:107BA1E:6AFE2C97 |
| html-safe-nonce | 7c6d6c9d42c111e878784244c675df50c474c537ded33a32d149423b8a53c8dc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQTUyOjJEQTc4MTpCQjI2QkM6MTA3QkExRTo2QUZFMkM5NyIsInZpc2l0b3JfaWQiOiIzOTk0MjA5OTQwODU0OTQyODcyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 2b628bdf52a760c7b2ecbfa28d1a34d5e0d49acdcfddc3b218f804299b20f346 |
| hovercard-subject-tag | issue:246517452 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/7200/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d5f40153ddca55102adae128cafa7611177cf33ed73804243d480d883415aa43/angular/angular-cli/issues/7200 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d5f40153ddca55102adae128cafa7611177cf33ed73804243d480d883415aa43/angular/angular-cli/issues/7200 |
| og:image:alt | Bug Report or Feature Request (mark with an x) - [x] bug report -> please search issues before submitting - [ ] feature request Versions. @angular/cli: 1.3.0-rc.1 node: 6.10.3 os: darwin x64 Repro ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | chrillewoodz |
| hostname | github.com |
| expected-hostname | github.com |
| None | e973f9ec3625f3faad8cac5c2d11a214b7ffe45f3cc563b828459b290ecaeed3 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1f92c367595b9190e0be293896078033886b1913 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width