Failed to create a new app with NativeScript

I wanted to create my first application with NativeScript. I followed all the steps on this page: https://docs.nativescript.org/setup/windows Then, I ran the command: 'ns doctor android' and got the following result:

√ Getting environment information
No issues were detected.
√ Your ANDROID_HOME environment variable is set and points to correct directory.
√ Your adb from the Android SDK is correctly installed.
√ The Android SDK is installed.
√ A compatible Android SDK for compilation is found.
√ Javac is installed and is configured properly.
√ The Java Development Kit (JDK) is installed and is configured properly.
√ Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.
√ Getting NativeScript components versions information...
√ Component nativescript has 8.8.1 version and is up to date.

After that, I tried to use this command: 'ns create'. I chose Vue and Blank as the template, but then I got the following error message:

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'D:\Artem_projects\FamApp\node_modules\npm\bin\npm-cli.js'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'D:\Artem_projects\FamApp\node_modules\npm\bin\npm-cli.js'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
Command "npm.cmd" failed with exit code 1

I tried reinstalling Node.js, npm, nvm and the NativeScript CLI. I also tried two versions of Node.js: 18 and 16. I ran the command npm cache clean --force

Has anyone else faced this problem? Any help would be appreciated

Upvotes: 0

Views: 38

Answers (0)

Related Questions