Title: Could not resolve [moduleName] relative to [path] for modules ending with "*.js" · Issue #14663 · angular/angular · GitHub
Open Graph Title: Could not resolve [moduleName] relative to [path] for modules ending with "*.js" · Issue #14663 · angular/angular
X Title: Could not resolve [moduleName] relative to [path] for modules ending with "*.js" · Issue #14663 · angular/angular
Description: PR here #14664 I'm submitting a ... (check one with "x") [x] bug report => search github for a similar issue or PR before submitting [ ] feature request [ ] support request => Please do not submit support request here, instead see https:...
Open Graph Description: PR here #14664 I'm submitting a ... (check one with "x") [x] bug report => search github for a similar issue or PR before submitting [ ] feature request [ ] support request => Please do not submit ...
X Description: PR here #14664 I'm submitting a ... (check one with "x") [x] bug report => search github for a similar issue or PR before submitting [ ] feature request [ ] support request => P...
Opengraph URL: https://github.com/angular/angular/issues/14663
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Could not resolve [moduleName] relative to [path] for modules ending with \"*.js\"","articleBody":"PR here https://github.com/angular/angular/pull/14664\r\n\r\n**I'm submitting a ...** (check one with \"x\")\r\n```\r\n[x] bug report => search github for a similar issue or PR before submitting\r\n[ ] feature request\r\n[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\r\n```\r\n\r\n**Current behavior**\r\n\r\nThe issue is in `@angular/compiler-cli` when using AoT and referencing modules which end with `.js`. For instance:\r\n\r\n```ts\r\n// ...\r\nimport { Wove } from 'aspect.js';\r\n\r\n@Wove()\r\nexport class NameListService {\r\n\r\n constructor(private http: Http) {}\r\n\r\n get(): Observable\u003cstring[]> {\r\n return this.http.get('assets/data.json')\r\n .map((res: Response) => res.json())\r\n .catch(this.handleError);\r\n }\r\n}\r\n```\r\n\r\nFails with error:\r\n\r\n```\r\nError: Error encountered resolving symbol values statically. Could not resolve aspect.js relative to .../shared/name-list/name-list.service.ts., resolving symbol NameListService in .../shared/name-list/name-list.service.ts, resolving symbol NameListService in .../app/shared/name-list/name-list.service.ts\r\n```\r\n\r\nThe issue is in:\r\n\r\n`CompilerHost.getCanonicalFileName` where the `.js` from `aspect.js` is being stripped by the line\r\n`m = m.replace(EXT, '');`, since it's considered as a relative path.\r\n\r\n**Expected behavior**\r\n\r\nThere should not be an error.\r\n\r\n**Minimal reproduction of the problem with instructions**\r\n\r\nTry to use the `@Wove` decorator from [`aspect.js`](https://github.com/mgechev/aspect.js).\r\n\r\n* **Angular version:** 2.0.X\r\n\r\nAngular 2.4 - 4.0.\r\n \r\n* **Language:** TypeScript\r\n\r\nAccording to https://github.com/Microsoft/TypeScript/issues/4595, stripping the file extension is not required because the TypeScript compiler accepts imports with which include extension.","author":{"url":"https://github.com/mgechev","@type":"Person","name":"mgechev"},"datePublished":"2017-02-23T03:13:08Z","url":"https://github.com/angular/angular/issues/14663"}
| 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:399bebe9-76a4-b894-083d-d0c160390d6a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 96B6:3CEE1E:A9E1D8:EDCE47:6B048B2F |
| html-safe-nonce | 6bffad9b474b536b9ee31c0b429e4633413a0e367b27fa6fa5d4ff3fe6ddbe6c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NkI2OjNDRUUxRTpBOUUxRDg6RURDRTQ3OjZCMDQ4QjJGIiwidmlzaXRvcl9pZCI6IjM1OTAwNzA4NTcwODQ3MzQyNTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 634a98d9a565915f816fc76a2eac89743e1b3268d60e09014b782076aa29136b |
| hovercard-subject-tag | issue:209651604 |
| 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/14663/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e591a6b7be1f512598a61890b5a239f8f8ff4fb3c56d8151fceb9c9a4250692a/angular/angular/issues/14663 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e591a6b7be1f512598a61890b5a239f8f8ff4fb3c56d8151fceb9c9a4250692a/angular/angular/issues/14663 |
| og:image:alt | PR here #14664 I'm submitting a ... (check one with "x") [x] bug report => search github for a similar issue or PR before submitting [ ] feature request [ ] support request => Please do not submit ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mgechev |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9b297275a74a2c9a35898175c9477837c635d4f579277ebff3b2d6ebd012e247 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| 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 | b51ce57ca6d4565a42856fc1c9897077c794597f |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width