Skip to content

Error in create project #10610

@Robson96

Description

@Robson96

Issue Description

I'm trying to create a project in several ways but it always gives the same error

Reproduction

ns create myCoolApp --js

Relevant log output (if applicable)

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

Error: Cannot find module 'C:\Users\user\Documents\native-script\myCoolApp\node_modules\npm\bin\npm-cli.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
    at Module._load (node:internal/modules/cjs/loader:985:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.10.0
node:internal/modules/cjs/loader:1147
  throw err;
  ^

Error: Cannot find module 'C:\Users\user\Documents\native-script\myCoolApp\node_modules\npm\bin\npm-cli.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
    at Module._load (node:internal/modules/cjs/loader:985:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.10.0
Command "npm.cmd" failed with exit code 1

Environment

PS C:\Users\user\Documents\native-script> sdkmanager.bat --version
16.0-alpha01

PS C:\Users\user\Documents\native-script> javac --version
javac 17.0.8.1

PS C:\Users\user\Documents\native-script> ns -v
8.8.1
✔ Up to date.

OS: Windows 11 10.0.22631
CPU: (8) x64 AMD Ryzen 5 7520U with Radeon Graphics
Shell: Not Found
node: 20.10.0
npm: 10.2.3
nativescript: Not Found

# android
java: Not Found
ndk: Not Found
apis: 32, 33, 34
build_tools: 30.0.3, 33.0.1, 34.0.0
system_images:
  - android-27 | Google Play Intel x86 Atom
  - android-31 | Google Play Intel x86_64 Atom
  - android-33 | Google Play Intel x86_64 Atom
  - android-34 | Google APIs Intel x86_64 Atom

# ios
xcode: Not Found
cocoapods: Not Found
python: Not Found
python3: Not Found
ruby: Not Found
platforms: Not Found

Dependencies

"dependencies": {},
"devDependencies": {}

Please accept these terms

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-pending-triageReported bug, pending triage to confirm.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions