Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Error: Cannot find module 'node_modules\nativescript\bin\tns' #214

@joey0xx

Description

@joey0xx

Hello, this is my first time working with Webpack.

When running npm run start-android-bundle I get the following error:

Running tns prepare... module.js:471 throw err; ^ Error: Cannot find module 'C:\Users\Angel\Documents\NativeScript\WebpackTest\node_modules\nativescript\bin\tns' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:390:7) at startup (bootstrap_node.js:150:9) at bootstrap_node.js:505:3 child process exited with code 1 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ ns-bundle: `ns-bundle` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ ns-bundle script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Angel\AppData\Roaming\npm-cache\_logs\2017-07-07T22_11_28_101Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ start-android-bundle: `npm run ns-bundle --android --run-app` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ start-android-bundle script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Angel\AppData\Roaming\npm-cache\_logs\2017-07-07T22_11_28_123Z-debug.log 

The following is the package.json:

"dependencies": { "@angular/animations": "~4.1.0", "@angular/common": "~4.1.0", "@angular/compiler": "~4.1.0", "@angular/core": "~4.1.0", "@angular/forms": "~4.1.0", "@angular/http": "~4.1.0", "@angular/platform-browser": "~4.1.0", "@angular/router": "~4.1.0", "nativescript-angular": "~3.1.0", "nativescript-theme-core": "~1.0.2", "reflect-metadata": "~0.1.8", "rxjs": "~5.3.0", "tns-core-modules": "~3.1.0", "zone.js": "~0.8.2" }, "devDependencies": { "@angular/compiler-cli": "~4.1.0", "@ngtools/webpack": "~1.4.0", "babel-traverse": "6.4.5", "babel-types": "6.4.5", "babylon": "6.4.5", "copy-webpack-plugin": "~4.0.1", "extract-text-webpack-plugin": "~2.1.0", "lazy": "1.0.11", "nativescript-css-loader": "~0.26.0", "nativescript-dev-typescript": "~0.5.0", "nativescript-dev-webpack": "^0.7.2", "raw-loader": "~0.5.1", "resolve-url-loader": "~2.0.2", "typescript": "~2.2.1", "webpack": "~3.0.0", "webpack-bundle-analyzer": "^2.8.2", "webpack-sources": "~1.0.1" }, "scripts": { "ns-bundle": "ns-bundle", "start-android-bundle": "npm run ns-bundle --android --run-app", "start-ios-bundle": "npm run ns-bundle --ios --run-app", "build-android-bundle": "npm run ns-bundle --android --build-app", "build-ios-bundle": "npm run ns-bundle --ios --build-app", "publish-ios-bundle": "npm run ns-bundle --ios --publish-app", "generate-android-snapshot": "generate-android-snapshot --targetArchs arm,ia32 --install" } 

That's on a new test project I created because on the project I was originally working I was getting the same error.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions