NativeScript / NativeScript/plugins

demo not working : Cannot find module '@nativescript/localize/hooks/before-watchPatterns.js'

Open
#544 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
206
Forks
123
Avg merge
2d 1h
Merged PRs (30d)
1

Description

Hi,

Angular demo apps is not working.

Here the steps i follow :

git clone git@github.com:NativeScript/plugins.git
cd plugins
npm run setup
npm start

within npm start :

  • @nativescript.build-all
  • apps.demo.ios

The log :

―――――――――――――――――――――――― 
Running NativeScript CLI within apps/demo
 
ns debug ios --no-hmr --force
 
---
Searching for devices...
Preparing project...
webpack is watching the files...
assets by path *.js 9.43 MiB
  asset vendor.js 6.95 MiB [compared for emit] (name: vendor) (id hint: defaultVendor)
  asset bundle.js 2.34 MiB [emitted] [compared for emit] (name: bundle)
  asset packages_contacts_models_contact_ios_ts.js 56.7 KiB [compared for emit]
  asset packages_contacts_worker-get-contacts-by-name_ios_ts-_package_json.js 26 KiB [compared for emit]
  asset packages_contacts_worker-get-all-contacts_ios_ts-_package_json.js 25.7 KiB [compared for emit]
  asset runtime.js 12.4 KiB [compared for emit] (name: runtime)
  asset packages_theme-switcher_theme-loader_js_tools_demo_theme-switcher_themes_red_scss.js 4.42 KiB [compared for emit]
  asset packages_theme-switcher_theme-loader_js_tools_demo_theme-switcher_themes_green_scss.js 4.22 KiB [compared for emit]
  asset packages_theme-switcher_theme-loader_js_tools_demo_theme-switcher_themes_default_scss.js 3.2 KiB [compared for emit]
asset images/bigpic.jpg 15.4 MiB [compared for emit] [from: ../../tools/images/bigpic.jpg] [copied]
asset fonts/Linearicons-Free.ttf 79.7 KiB [compared for emit] [from: src/fonts/Linearicons-Free.ttf] [copied]
asset logos/ns-logo.png 28.4 KiB [compared for emit] [from: ../../tools/assets/logos/ns-logo.png] [copied]
asset tns_modules/inspector_modules.js 1.22 KiB [compared for emit] (name: tns_modules/inspector_modules)
Entrypoint bundle 9.31 MiB = runtime.js 12.4 KiB vendor.js 6.95 MiB bundle.js 2.34 MiB
Entrypoint tns_modules/inspector_modules 6.97 MiB = runtime.js 12.4 KiB vendor.js 6.95 MiB tns_modules/inspector_modules.js 1.22 KiB
runtime modules 9.24 KiB 24 modules
orphan modules 11.4 KiB [orphan] 7 modules
modules by path ../../ 3.02 MiB
  modules by path ../../node_modules/ 2.65 MiB 338 modules
  modules by path ../../packages/ 304 KiB 70 modules
  modules by path ../../tools/demo/ 74.2 KiB 41 modules
modules by path ./src/ 409 KiB
  modules by path ./src/plugin-demos/ 343 KiB 70 modules
  modules by path ./src/*.ts 861 bytes 3 modules
  modules by path ./src/*.xml 4.05 KiB 2 modules
  modules by path ./src/modals/ 888 bytes 2 modules
  ./src/ sync \.(xml%7Cjs%7C(?<%21\.d\.)ts%7Cs?css)$ 2.72 KiB [built] [code generated]
  ./src/app.scss 57.9 KiB [built] [code generated]
external "~/package.json" 42 bytes [optional] [built] [code generated]

WARNING in ./src/plugin-demos/imagepicker.xml
Module Warning (from ../../node_modules/@nativescript/webpack/dist/loaders/xml-namespace-loader/index.js):
Invalid character in entity name
Line: 20
Column: 51
Char: &
 @ ./src/ sync \.(xml%7Cjs%7C(?<%21\.d\.)ts%7Cs?css)$ ./plugin-demos/imagepicker.xml
 @ ../../node_modules/@nativescript/webpack/dist/stubs/virtual-entry-typescript.js 3:16-103

1 warning has detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.89.0 compiled with 1 warning in 6189 ms
Webpack compilation complete. Watching for file changes.
Cannot find module '@nativescript/localize/hooks/before-watchPatterns.js'
Require stack:
- /Users/alexist/plugins/apps/demo/hooks/before-watchPatterns/nativescript-localize.js
- /Users/alexist/.nvm/versions/node/v18.16.1/lib/node_modules/nativescript/lib/common/services/hooks-service.js
- /Users/alexist/.nvm/versions/node/v18.16.1/lib/node_modules/nativescript/lib/common/yok.js
- /Users/alexist/.nvm/versions/node/v18.16.1/lib/node_modules/nativescript/lib/bootstrap.js
- /Users/alexist/.nvm/versions/node/v18.16.1/lib/node_modules/nativescript/lib/nativescript-cli.js
- /Users/alexist/.nvm/versions/node/v18.16.1/lib/node_modules/nativescript/bin/tns
Done.

 

 >  NX   Running target ios for project demo and 71 tasks it depends on failed
 

My environment :

  • os : macos
  • yarn : 1.22.19
  • node : v18.16.1
  • npm : 8.19.4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with apps/demo/hooks/before-watchPatterns/nativescript-localize.js and inspect how it references @nativescript/localize/hooks/before-watchPatterns.js after npm run setup. Reproduce with npm start and verify that the Angular iOS demo launches without the missing-module error.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.