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

Error with sidedrawer template: The entry module app specified in D:\my_path\src/package.json doesn't exist!"

Open ettolo opened this issue 4 years ago • 2 comments

After creating a new app with tns create answering the qustion to get the sidedrawer TypeScript template,, I get this error when trying tns_preview

"Preparing project...
D:\my_path\node_modules\webpack-cli\bin\cli.js:93
Error: The entry module app specified in D:\my_path\src/package.json doesn't exist!"

I got the error with preview in iOS and Android

tns doctor output:

No issues were detected.tch (S/N)? s
√ 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.on
√ 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 7.0.10 version and is up to date.
√ Component @nativescript/core has 7.0.11 version and is up to date.
‼ Update available for component @nativescript/ios. Your current version is 7.0.1 and the latest available version is 7.0.2-rc1.
√ Component @nativescript/android has 7.0.0 version and is up to date.

ettolo avatar Oct 15 '20 06:10 ettolo

Running Nativescript 7.0.11 and although not using the Angular template, the same error occurs.

** Indicates my comment or the step performing

** Error: The entry module app specified in .\xxx\src\package.json ** Which is a bit of a misnomer since no such file exists in the src director, ** let alone an entry module tag.

** Issue: package.json is one level up in the directory - .\xxx\package.json

Indicates my cli entries

**1) Started with a clean installation of nativescript 7 on windows 10

npm install -g nativescript **2) Created a project from the template ns create xxx --template @nativescript/template-drawer-navigation-ts npm WARN deprecated [email protected]: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information. npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated [email protected]: this library is no longer supported npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

[email protected] install c:\WorldPerfectLLC\xxx\node_modules\node-sass node scripts/install.js

Cached binary found at C:\Users\Hunte\AppData\Roaming\npm-cache\node-sass\4.14.1\win32-x64-83_binding.node

[email protected] postinstall c:\WorldPerfectLLC\xxx\node_modules\ejs node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

@nativescript/[email protected] postinstall c:\WorldPerfectLLC\xxx\node_modules@nativescript\core node cli-hooks/postinstall.js

@nativescript/[email protected] postinstall c:\WorldPerfectLLC\xxx\node_modules@nativescript\webpack node postinstall.js

Creating file: c:\WorldPerfectLLC\xxx\webpack.config.js

[email protected] postinstall c:\WorldPerfectLLC\xxx\node_modules\node-sass node scripts/build.js

Binary found at c:\WorldPerfectLLC\xxx\node_modules\node-sass\vendor\win32-x64-83\binding.node Testing binary Binary is fine npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\watchpack-chokidar2\node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 825 packages from 481 contributors and audited 827 packages in 36.063s

33 packages are looking for funding run npm fund for details

found 0 vulnerabilities

Project xxx was successfully created.

Now you can navigate to your project with $ cd xxx

After that you can preview it on device by executing $ ns preview

**Insure I have a device ready and its #

ns devices

Connected devices & emulators Searching for devices... ┌───┬─────────────┬──────────┬─────────────────────┬──────────┬───────────┬─────────────────┐ │ # │ Device Name │ Platform │ Device Identifier │ Type │ Status │ Connection Type │ │ 1 │ Samsung │ Android │ 192.168.56.102:5555 │ Emulator │ Connected │ Local │ └───┴─────────────┴──────────┴─────────────────────┴──────────┴───────────┴─────────────────┘

**Navigate to the newly created app from the template & run it. (visually can observe the emulator)

c:\WorldPerfectLLC>cd xxx c:\WorldPerfectLLC\xxx>ns run --device 1

Searching for devices... Your application will be deployed only on the device specified by the provided index or identifier. Copying template files... / [..................] - rollbackFailedOptional: WARN install Usage of the --dev option is deprecated. Use --also=dev- [..................] - rollbackFailedOptional: WARN install Usage of the --devoption is deprecated. Use--also=dev\ [..................] - rollbackFailedOptional: WARN install Usage of the --dev option is deprecated. Use --also=dev- [..................] - rollbackFailedOptional: WARN install Usage of the --devoption is deprecated. Use--also=dev\ [..................] - rollbackFailedOptional: WARN install Usage of the --dev option is deprecated. Use --also=dev| [..................] - rollbackFailedOptional: WARN install Usage of the --devoption is deprecated. Use--also=dev\ [..................] - rollbackFailedOptional: WARN install Usage of the --dev option is deprecated. Use --also=dev| [..................] - rollbackFailedOptional: WARN install Usage of the --devoption is deprecated. Use--also=dev/ [..................] - rollbackFailedOptional: WARN install Usage of the --dev option is deprecated. Use --also=dev- [..................] - rollbackFailedOptional: WARN install Usage of the --devoption is deprecated. Use--also=dev\ [..................] - rollbackFailedOptional: WARN install Usage of the --dev option is deprecated. Use --also=dev| [..................] - rollbackFailedOptional: WARN install Usage of the --devoption is deprecated. Use--also=dev/ [..................] - rollbackFailedOptional: WARN install Usage of the --dev option is deprecated. Use --also=dev- [ ...............] | loadDep:source-map: sill resolveWithNewModule @nativescript/[email protected] checking installable \ [ ............] | loadExtraneous: sill resolveWithNewModule @nativescript/[email protected] checking installable stat| [ ............] | loadExtraneous: sill resolveWithNewModule @nativescript/[email protected] checking installable stat/ [ ............] | loadExtraneous: sill resolveWithNewModule @nativescript/[email protected] checking installable stat- [ ............] | loadExtraneous: sill resolveWithNewModule @nativescript/[email protected] checking installable stat\ [ ............] | loadExtraneous: sill resolveWithNewModule @nativescript/[email protected] checking installable stat| [ ............] | loadExtraneous: sill resolveWithNewModule @nativescript/[email protected] checking installable stat/ [ ............] | loadExtraneous: sill resolveWithNewModule @nativescript/[email protected] checking installable stat- [ ............] | loadExtraneous: sill resolveWithNewModule @nativescript/[email protected] checking installable stat\ [ ............] | loadExtraneous: sill resolveWithNewModule @nativescript/[email protected] checking installable stat| [ ............] | loadExtraneous: sill resolveWithNewModule @nativescript/[email protected] checking installable stat/ [ ............] | loadExtraneous: sill resolveWithNewModule @nativescript/[email protected] checking installable stat\ [ ............] | loadExtraneous: sill resolveWithNewModule @nativescript/[email protected] checking installable stat\ [ .........] | extract:fsevents: sill extract [email protected] extracted to c:\WorldPerfectLLC\xxx\node_modules\| [ ........] / extract:fsevents: sill extract [email protected] extracted to c:\WorldPerfectLLC\xxx\node_modules/ [ ........] / extract:fsevents: sill extract [email protected] extracted to c:\WorldPerfectLLC\xxx\node_modules- [ ........] | extract:fsevents: sill extract [email protected] extracted to c:\WorldPerfectLLC\xxx\node_modules\ [ ........] | extract:fsevents: sill extract [email protected] extracted to c:\WorldPerfectLLC\xxx\node_modules| [ ........] | extract:fsevents: sill extract [email protected] extracted to c:\WorldPerfectLLC\xxx\node_modules/ [ ........] | extract:fsevents: sill extract [email protected] extracted to c:\WorldPerfectLLC\xxx\node_modules- [ ........] | extract:fsevents: sill extract [email protected] extracted to c:\WorldPerfectLLC\xxx\node_modules\ [ ........] | extract:fsevents: sill extract [email protected] extracted to c:\WorldPerfectLLC\xxx\node_modules| [ ........] | extract:fsevents: sill extract [email protected] extracted to c:\WorldPerfectLLC\xxx\node_modules/ [ ........] | extract:fsevents: sill extract [email protected] extracted to c:\WorldPerfectLLC\xxx\node_modules- [ ........] | extract:fsevents: sill extract [email protected] extracted to c:\WorldPerfectLLC\xxx\node_modules\ [ ........] | extract:fsevents: sill extract [email protected] extracted to c:\WorldPerfectLLC\xxx\node_modules| [ ........] | extract:fsevents: sill extract [email protected] extracted to c:\WorldPerfectLLC\xxx\node_modules/ [ ........] | extract:fsevents: sill extract [email protected] extracted to c:\WorldPerfectLLC\xxx\node_modules- [ ........] | extract:fsevents: sill extract [email protected] extracted to c:\WorldPerfectLLC\xxx\node_modules\ [ ........] | extract:fsevents: sill extract [email protected] extracted to c:\WorldPerfectLLC\xxx\node_modules| [ ........] | extract:fsevents: sill extract [email protected] extracted to c:\WorldPerfectLLC\xxx\node_modules/ [ ........] | extract:fsevents: sill extract [email protected] extracted to c:\WorldPerfectLLC\xxx\node_modules- [ ........] | extract:fsevents: sill extract [email protected] extracted to c:\WorldPerfectLLC\xxx\node_modules| [ ......] | postinstall: info lifecycle @nativescript/[email protected]~postinstall: @nativescript/[email protected] [ ......] \ postinstall: info lifecycle @nativescript/[email protected]~postinstall: @nativescript/[email protected].+ @nativescript/[email protected] added 1 package and audited 828 packages in 10.267s | 33 packages are looking for funding run npm fund` for details

found 0 vulnerabilities

Platform android successfully added. v7.0.1 Preparing project... c:\WorldPerfectLLC\xxx\node_modules\webpack-cli\bin\cli.js:93 throw err; ^

Error: The entry module app specified in c:\WorldPerfectLLC\xxx\src/package.json doesn't exist! at Object.exports.getEntryModule (c:\WorldPerfectLLC\xxx\node_modules@nativescript\webpack\index.js:91:15) at module.exports (c:\WorldPerfectLLC\xxx\webpack.config.js:84:35) at handleFunction (c:\WorldPerfectLLC\xxx\node_modules\webpack-cli\bin\utils\prepareOptions.js:21:13) at prepareOptions (c:\WorldPerfectLLC\xxx\node_modules\webpack-cli\bin\utils\prepareOptions.js:9:5) at requireConfig (c:\WorldPerfectLLC\xxx\node_modules\webpack-cli\bin\utils\convert-argv.js:117:14) at c:\WorldPerfectLLC\xxx\node_modules\webpack-cli\bin\utils\convert-argv.js:123:17 at Array.forEach () at module.exports (c:\WorldPerfectLLC\xxx\node_modules\webpack-cli\bin\utils\convert-argv.js:121:15) at c:\WorldPerfectLLC\xxx\node_modules\webpack-cli\bin\cli.js:71:45 at Object.parse (c:\WorldPerfectLLC\xxx\node_modules\yargs\yargs.js:576:18) at c:\WorldPerfectLLC\xxx\node_modules\webpack-cli\bin\cli.js:49:8 at Object. (c:\WorldPerfectLLC\xxx\node_modules\webpack-cli\bin\cli.js:366:3) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) at Object. (c:\WorldPerfectLLC\xxx\node_modules\webpack\bin\webpack.js:156:2) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) at internal/main/run_main_module.js:17:47 Executing webpack failed with exit code 1.

HunterTKingsley avatar Nov 18 '20 16:11 HunterTKingsley

Same problem here

ali-habibzadeh avatar Dec 28 '20 15:12 ali-habibzadeh