NativeScript / plugins

@nativescript plugins to help with your developments.
https://docs.nativescript.org/plugins/index.html
Apache License 2.0
187 stars 104 forks source link

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

Open alexist opened 8 months ago

alexist commented 8 months ago

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 :

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 :

glorious73 commented 6 months ago

After deleting the folders node-modules, platform, and hooks, and deleting the file package-lock.json. Then, hitting npm install followed by ns run android or ns run ios, it worked for me.