Title: note: if using 'ns preview', use `--env.commonjs` flag · Issue #11213 · NativeScript/NativeScript · GitHub
Open Graph Title: note: if using 'ns preview', use `--env.commonjs` flag · Issue #11213 · NativeScript/NativeScript
X Title: note: if using 'ns preview', use `--env.commonjs` flag · Issue #11213 · NativeScript/NativeScript
Description: Issue Description My project is literally using ns create example-app --ng, nothing more, nothing less. I haven't added or removed a single thing from it. Using ns preview and ns preview --no-hmr --force and ns preview --no-hmr all gave ...
Open Graph Description: Issue Description My project is literally using ns create example-app --ng, nothing more, nothing less. I haven't added or removed a single thing from it. Using ns preview and ns preview --no-hmr -...
X Description: Issue Description My project is literally using ns create example-app --ng, nothing more, nothing less. I haven't added or removed a single thing from it. Using ns preview and ns preview --no-h...
Opengraph URL: https://github.com/NativeScript/NativeScript/issues/11213
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"note: if using 'ns preview', use `--env.commonjs` flag","articleBody":"### Issue Description\n\nMy project is literally using `ns create example-app --ng`, nothing more, nothing less. I haven't added or removed a single thing from it.\n\nUsing `ns preview` and `ns preview --no-hmr --force` and `ns preview --no-hmr` all gave me the same results.\n\nI was resetting the cache, resetting the app, reinstalling the app, but still, that didn't solve it...\n\nBonus note: It worked on my iPhone X, and it worked on my Redmi Note 8, but not on my **Samsung Galaxy S25**...\n\nThis is my whole terminal:\n\n```\n(base) ➜ example-app git:(demo-branch) ✗ ns preview\nnpm warn deprecated lodash.get@4.4.2: This package is deprecated. Use the optional chaining (?.) operator instead.\nnpm warn deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated\nnpm warn deprecated webpack-chain@6.5.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.\nnpm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead\nnpm warn deprecated uuid@8.3.2: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).\n\nadded 838 packages, and audited 839 packages in 17s\n\n184 packages are looking for funding\n run `npm fund` for details\n\n22 vulnerabilities (1 low, 6 moderate, 15 high)\n\nTo address issues that do not require attention, run:\n npm audit fix\n\nTo address all issues possible, run:\n npm audit fix --force\n\nSome issues need review, and may require choosing\na different dependency.\n\nRun `npm audit` for details.\n i ┌───────────────────────────────────────────┐\n i ├─ {N} NativeScript Preview 2.0 [v1.0.15] ──┤\n i └───────────────────────── You are a hero! ─┘\n┃\n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃ \n┃\n i Scan the above QR code with your device to connect to this session.\n i Scanning can be done with the default camera app on iOS or any other application capable of scanning QR codes.\n i \n i This CLI is interactive, you can press the following keys any time (make sure the terminal has focus):\n i \n i [R] - restart the Preview app on all connected devices\n i [S] - reset the Preview app on all connected devices\n i [O] - open the Web UI to scan the QR code\n i \n i Waiting for device connections...\n i Device connected: SM-S931B [android: 2.1.9 (41)]\n\n✔ Building for android\n Compiled successfully in 4.31s\n\n i Build complete. Uploading files...\n i Upload complete. Applying changes on connected devices...\n i Device disconnected: SM-S931B [android: 2.1.9 (41)]\n i Device connected: SM-S931B [android: 2.1.9 (41)]\n```\n\nyou can see the following:\n\n1. `ns preview` was ran\n2. The QR was displayed\n3. The QR was scanned\n4. The build was uploaded\n5. The device got connected and reconnected\n6. The error on my device, Samsung Galaxy S25, emerged:\n\u003cimg width=\"1080\" height=\"2210\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/329ad4bf-94a4-4442-8b51-d1380e93fbf5\" /\u003e\n\n### Reproduction\n\n_No response_\n\n### Relevant log output (if applicable)\n\n```shell\n\n```\n\n### Environment\n\n_No response_\n\n### Please accept these terms\n\n- [x] I have searched the [existing issues](https://github.com/NativeScript/NativeScript/issues) as well as [StackOverflow](https://stackoverflow.com/questions/tagged/nativescript) and this has not been posted before\n- [x] This is a bug report\n- [x] I agree to follow this project's [Code of Conduct](https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#coc)","author":{"url":"https://github.com/Sefibrah","@type":"Person","name":"Sefibrah"},"datePublished":"2026-05-10T11:16:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/11213/NativeScript/issues/11213"}
| 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:6d57094a-3197-c520-ff18-9027fcad8bbe |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A7EA:E10D4:6DBCAB:96F054:6A63A90F |
| html-safe-nonce | 730b5a710c9be1a877560de9d2d5c55981dae720e022cb425c93374f2b549a0f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBN0VBOkUxMEQ0OjZEQkNBQjo5NkYwNTQ6NkE2M0E5MEYiLCJ2aXNpdG9yX2lkIjoiNDYyNzM3MTM0Mzg1NjUxMTI0NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4990c1fa11a54afe78cd47c3255b75c7a420c6bf0fc21240affe87a76aa93c00 |
| hovercard-subject-tag | issue:4415454772 |
| 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/NativeScript/NativeScript/11213/issue_layout |
| twitter:image | https://opengraph.githubassets.com/12d65553458e3e981cfc942d91f2ff89967aecf892ff4eee5927dbc385409cdc/NativeScript/NativeScript/issues/11213 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/12d65553458e3e981cfc942d91f2ff89967aecf892ff4eee5927dbc385409cdc/NativeScript/NativeScript/issues/11213 |
| og:image:alt | Issue Description My project is literally using ns create example-app --ng, nothing more, nothing less. I haven't added or removed a single thing from it. Using ns preview and ns preview --no-hmr -... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Sefibrah |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ca676e17c4da4532dc68541e9fc874034ae840c26b5f34da7f1c42d9a600659 |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 31492490 |
| octolytics-dimension-repository_nwo | NativeScript/NativeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31492490 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/NativeScript |
| 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 | 3a0a9f049e072eb8e5795dfddcefdba9e277501d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width