NativeScript / NativeScript/plugins

demo not working : Cannot find module 'plugins/dist/packages/detox/postinstall.js'

Open
#543 0 comments 0 reactions 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-angular.ios

The log :

Running NativeScript CLI within apps/demo-angular
 
ns debug ios --no-hmr --force
 
---
Searching for devices...
Unable to install dependencies. Make sure your package.json is valid and all dependencies are correct. Error is: Command npm failed with exit code 1 Error output: 
 npm ERR! code 1
npm ERR! path /Users/alexist/plugins/dist/packages/detox
npm ERR! command failed
npm ERR! command sh -c -- node postinstall.js
npm ERR! node:internal/modules/cjs/loader:1080
npm ERR!   throw err;
npm ERR!   ^
npm ERR! 
npm ERR! Error: Cannot find module '/Users/alexist/plugins/dist/packages/detox/postinstall.js'
npm ERR!     at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
npm ERR!     at Module._load (node:internal/modules/cjs/loader:922:27)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
npm ERR!     at node:internal/main/run_main_module:23:47 {
npm ERR!   code: 'MODULE_NOT_FOUND',
npm ERR!   requireStack: []
npm ERR! }
npm ERR! 
npm ERR! Node.js v18.16.1

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/alexist/.npm/_logs/2023-11-07T16_50_18_973Z-debug-0.log

Done.

 

 >  NX   Running target ios for project demo-angular 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 the npm run setup and npm start entry points, then inspect the apps.demo-angular.ios build and the generated dist/packages/detox path mentioned in the error. Confirm why postinstall.js is missing and verify that the Angular iOS demo runs successfully without the MODULE_NOT_FOUND error.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, node.js
Domain
build-system, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.