NativeScript / nativescript-cli

Command-line interface for building NativeScript apps
https://www.npmjs.com/package/nativescript
Apache License 2.0
1.04k stars 195 forks source link

Add platform fails ENOENT node-pre-gyp #3115

Closed dottodot closed 7 years ago

dottodot commented 7 years ago

Tell us about the problem

When adding a platform either by using tns platform add or when it's added automatically on tns run if fails with the error

ENOENT: no such file or directory, open '/node_modules/node-pre-gyp/package.json'

I've tried removing the node_modules folder and doing npm cache clean and reinstalling

Which platform(s) does your issue occur on?

Both

Please provide the following version numbers that your issue occurs with:

├── @angular/animations@4.2.6 ├── @angular/common@4.2.6 ├── @angular/compiler@4.2.6 ├── @angular/compiler-cli@4.2.6 ├── @angular/core@4.2.6 ├── @angular/forms@4.2.6 ├── @angular/http@4.2.6 ├── @angular/language-service@4.3.6 ├── @angular/platform-browser@4.2.6 ├── @angular/router@4.2.6 ├── @ngtools/webpack@1.5.6 ├── babel-traverse@6.26.0 ├── babel-types@6.26.0 ├── babylon@6.18.0 ├── copy-webpack-plugin@4.0.1 ├── extract-text-webpack-plugin@3.0.0 ├── lazy@1.0.11 ├── nativescript-angular@4.2.0 ├── nativescript-appavailability@1.3.1 ├── nativescript-checkbox@2.1.11 ├── nativescript-css-loader@0.26.1 ├── nativescript-dev-sass@1.3.0 ├── nativescript-dev-typescript@0.5.0 ├── nativescript-dev-webpack@0.7.3 ├── nativescript-drop-down@3.1.1 ├── nativescript-secure-storage@2.2.0 ├── nativescript-theme-core@1.0.4 ├── node-pre-gyp@0.6.36 ├── raw-loader@0.5.1 ├── reflect-metadata@0.1.10 ├── resolve-url-loader@2.1.0 ├── rxjs@5.4.3 ├── tns-android@3.2.0 ├── tns-core-modules@3.2.0 ├── tns-ios@3.2.0 ├── tslint@5.7.0 ├── typescript@2.4.2 ├── webpack@3.5.6 ├── webpack-bundle-analyzer@2.9.0 ├── webpack-sources@1.0.1 └── zone.js@0.8.17

dottodot commented 7 years ago

Doing a complete reinstall including running the setup wizard seems to have resolved it.