NativeScript / NativeScript/NativeScript
Cannot find module 'semver'
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 25.7k
- Forks
- 1.7k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 35
Description
While ns run android --clean I kept getting this error after upgrading to version 8.
Webpack compilation complete. Watching for file changes.
nativescript-plugin-firebase: building for same environment, not forcing prepare.
Cannot find module 'semver'
Require stack:
- /Users/kanchan/DIGITebl/workplace/tebl/node_modules/@nativescript/core/cli-hooks/before-checkForChanges.js
- /Users/kanchan/DIGITebl/workplace/tebl/hooks/before-checkForChanges/nativescript-core.js
- /Users/kanchan/.nvm/versions/node/v14.17.0/lib/node_modules/nativescript/lib/common/services/hooks-service.js
- /Users/kanchan/.nvm/versions/node/v14.17.0/lib/node_modules/nativescript/lib/common/yok.js
- /Users/kanchan/.nvm/versions/node/v14.17.0/lib/node_modules/nativescript/lib/bootstrap.js
- /Users/kanchan/.nvm/versions/node/v14.17.0/lib/node_modules/nativescript/lib/nativescript-cli.js
- /Users/kanchan/.nvm/versions/node/v14.17.0/lib/node_modules/nativescript/bin/tns
I was only able to proceed after installing semver manually by doing npm i semver
I think this should not have been required and there is something not right.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with @nativescript/core/cli-hooks/before-checkForChanges.js and the related hooks/before-checkForChanges/nativescript-core.js entry point, then inspect how the NativeScript CLI resolves dependencies during ns run android --clean. Confirm the clean command completes without requiring a manual npm i semver.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100