nativescript-barcodescanner icon indicating copy to clipboard operation
nativescript-barcodescanner copied to clipboard

unable to run the barcodedemo on windows following given instructions

Open CharlesOkwuagwu opened this issue 6 years ago • 3 comments

Hi,

git clone https://github.com/EddyVerbruggen/nativescript-barcodescanner barcodedemo cd barcodedemo/src npm install npm run demo.android

Following the steps given above to run this example on windows yields the following:

C:\webdev\barcodedemo\src (master -> origin) ([email protected])
λ npm i

> [email protected] postinstall C:\webdev\barcodedemo\src\node_modules\nativescript-dev-typescript
> node postinstall.js

added 46 packages from 15 contributors and audited 82 packages in 4.487s
found 0 vulnerabilities


C:\webdev\barcodedemo\src (master -> origin) ([email protected])
λ npm run demo.android

> [email protected] demo.android C:\webdev\barcodedemo\src
> npm i && npm run tsc && cd ../demo && tns run android --syncAllFiles

audited 82 packages in 1.904s
found 0 vulnerabilities


> [email protected] tsc C:\webdev\barcodedemo\src
> tsc -skipLibCheck

Searching for devices...
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\es5-ext-36f445f0\math\fround\implement.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\es5-ext-36f445f0\math\fround\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\fsevents-40e40d59\node_modules\assert-plus\package.json'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\es5-ext-36f445f0\math\fround\is-implemented.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\fsevents-40e40d59\node_modules\assert-plus\README.md'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\es5-ext-36f445f0\math\fround\shim.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\fsevents-40e40d59\node_modules\assert-plus\assert.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\fsevents-40e40d59\node_modules\assert-plus\AUTHORS'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\webdev\barcodedemo\demo\node_modules\.staging\es5-ext-36f445f0\math\hypot'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\fsevents-40e40d59\node_modules\assert-plus\CHANGES.md'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\webdev\barcodedemo\demo\node_modules\.staging\core-js-d2745288\library\fn\number\virtual'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\core-js-d2745288\library\fn\regexp\constructor.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\core-js-d2745288\library\fn\regexp\escape.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\tns-core-modules-781a000a\ui\styling\style\package.json'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\core-js-d2745288\library\fn\regexp\flags.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\tns-core-modules-781a000a\ui\styling\style\style.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\core-js-d2745288\library\fn\regexp\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\tns-core-modules-781a000a\ui\styling\style\style.d.ts'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\core-js-d2745288\library\fn\regexp\match.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\core-js-d2745288\library\fn\regexp\replace.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\tns-core-modules-781a000a\ui\styling\style-properties.d.ts'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\core-js-d2745288\library\fn\regexp\search.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\tns-core-modules-781a000a\ui\styling\background.d.ts'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\core-js-d2745288\library\fn\regexp\split.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\core-js-d2745288\library\fn\regexp\to-string.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\fsevents-0141bc9a\node_modules\debug\src\browser.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\fsevents-0141bc9a\node_modules\debug\src\debug.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\fsevents-0141bc9a\node_modules\debug\src\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\fsevents-0141bc9a\node_modules\debug\src\inspector-log.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\fsevents-0141bc9a\node_modules\debug\src\node.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\es5-ext-36f445f0\string\#\@@iterator\implement.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\es5-ext-36f445f0\string\#\@@iterator\index.js'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\webdev\barcodedemo\demo\node_modules\.staging\fsevents-40e40d59\node_modules\debug\src'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\es5-ext-36f445f0\string\#\@@iterator\is-implemented.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\es5-ext-36f445f0\string\#\@@iterator\shim.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\fsevents-40e40d59\node_modules\form-data\package.json'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\fsevents-40e40d59\node_modules\form-data\README.md'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\fsevents-40e40d59\node_modules\form-data\License'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\fsevents-40e40d59\node_modules\getpass\node_modules\assert-plus\package.json'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\fsevents-40e40d59\node_modules\getpass\node_modules\assert-plus\README.md'npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\fsevents-40e40d59\node_modules\getpass\node_modules\assert-plus\assert.js'npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\fsevents-40e40d59\node_modules\getpass\node_modules\assert-plus\AUTHORS'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\fsevents-40e40d59\node_modules\getpass\node_modules\assert-plus\CHANGES.md'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\core-js-f134622a\library\fn\map\from.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\core-js-f134622a\library\fn\map\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\webdev\barcodedemo\demo\node_modules\.staging\core-js-f134622a\library\fn\map\of.js'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\webdev\barcodedemo\demo\node_modules\.staging\es5-ext-36f445f0\test\reg-exp\#\search'
npm WARN demo No description
npm WARN demo No repository field.
npm WARN demo No license field.

npm ERR! path C:\webdev\barcodedemo\demo\node_modules\.staging\nativescript-barcodescanner-d804862f\node_modules\ansi-regex
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\webdev\barcodedemo\demo\node_modules\.staging\nativescript-barcodescanner-d804862f\node_modules\ansi-regex' -> 'C:\webdev\barcodedemo\demo\node_modules\.staging\ansi-regex-a55fb84c'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Charles\AppData\Roaming\npm-cache\_logs\2018-08-21T12_36_17_902Z-debug.log
Command npm.cmd install failed with exit code 4294963238
# tns run android

┌────────────────────────────────────────────────────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Usage                                                          │ Synopsis                                                                                                  │
│ Run on all connected devices and running emulators             │ $ tns run android [--key-store-path <File Path> --key-store-password <Password> --key-store-alias <Name>  │
│                                                                │ --key-store-alias-password <Password>] [--release] [--justlaunch] [--bundle [<value>] [--env.*]]          │
│ Run on a selected connected device or running emulator. Will   │ $ tns run android --device <Device ID> [--key-store-path <File Path> --key-store-password <Password> -    │
│ start emulator with specified Device Identifier, if not        │ -key-store-alias <Name> --key-store-alias-password <Password>] [--release] [--justlaunch] [--bundle [     │
│ already running.                                               │ <value>] [--env.*]]                                                                                       │
│ Start a default emulator if none are running, or run           │ $ tns run android --emulator [--key-store-path <File Path> --key-store-password <Password> --key-store    │
│ application on all connected emulators.                        │ -alias <Name> --key-store-alias-password <Password>] [--release] [--justlaunch] [--bundle [<value>] [-    │
│                                                                │ -env.*]]                                                                                                  │
└────────────────────────────────────────────────────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Runs your project on a connected Android device or in a native Android emulator, if configured. This is shorthand for prepare, build and deploy. While your app is running, prints the output from the application in the console and watches for changes in your code. Once a change is detected, it synchronizes the change with all selected devices and restarts/refreshes the application.

### Options

    * --device - Specifies a connected device/emulator to start and run the app.
    * --emulator - If set, runs the app in all available and configured android emulators. It will start an emulator if none are already running.
    * --justlaunch - If set, does not print the application output in the console.
    * --clean - If set, forces rebuilding the native application.
    * --no-watch - If set, changes in your code will not be reflected during the execution of this command.
    * --release - If set, produces a release build. Otherwise, produces a debug build. When set, you must also specify the --key-store-* options.
    * --key-store-path - Specifies the file path to the keystore file (P12) which you want to use to code sign your APK. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
    * --key-store-password - Provides the password for the keystore file specified with --key-store-path. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
    * --key-store-alias - Provides the alias for the keystore file specified with --key-store-path. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
    * --key-store-alias-password - Provides the password for the alias specified with --key-store-alias-password. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
    * --bundle - Specifies that a bundler (e.g. webpack) should be used if one is present. If no value is passed will default to webpack.
    * --env.* - Specifies additional flags that the bundler may process. May be passed multiple times. For example: --env.uglify --env.snapshot.
    * --syncAllFiles - Watches all production dependencies inside node_modules for changes. Triggers project rebuild if necessary!

### Attributes

    * <Device ID> is the index or Device Identifier of the target device as listed by $ tns device android --available-devices

npm ERR! file C:\WINDOWS\system32\cmd.exe
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] demo.android: `npm i && npm run tsc && cd ../demo && tns run android --syncAllFiles`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] demo.android 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\Charles\AppData\Roaming\npm-cache\_logs\2018-08-21T12_36_18_664Z-debug.log

C:\webdev\barcodedemo\src (master -> origin) ([email protected])
λ

CharlesOkwuagwu avatar Aug 21 '18 12:08 CharlesOkwuagwu

I get the same error.

alsoicode avatar Sep 17 '18 02:09 alsoicode

Any resolution on this matter?

sandisototo avatar Sep 20 '18 08:09 sandisototo

I am facing the same issue. Android Device: Moto G6 Play Android Version: 8.0.0 Windows Version: 10, x64 based processor

First ran the adb start-server and then went to barcodescanner-demo\src and then npm run demo.android Does this only work for certain Android & iOS models?

ShreejeetaMandal avatar Nov 06 '18 21:11 ShreejeetaMandal