Samsung / cordova-plugin-toast

Cordova plugin that provides TV Specific functionalities.
Apache License 2.0
122 stars 60 forks source link

Cannot find module 'inquirer' #55

Open AhmedGamal-Inmobly opened 7 years ago

AhmedGamal-Inmobly commented 7 years ago

I'm getting Cannot find module 'inquirer' with grunt commands when trying to prepare or build. What am I missing ?

prozanne commented 7 years ago

Hi :D In this case if inquirer module is not installed, It might be shown error such as "Cannot find module 'inquirer'". Can you check again whether you installed all dependent modules with 'npm install' command. Can you check whether "inquire" directory is exist on your [project root]/node_modules. image

If all above things are good, please upload your application as zip file.

AhmedGamal-Inmobly commented 7 years ago

Yes I've check the dependencies and inquirer is there, here's the app https://drive.google.com/file/d/0B8lbcIOZH70ERDgwN0doQ21nbTA/view?usp=sharing

dholbrook86 commented 7 years ago

Did you get this figured out? I'm having the same issue. "inquirer" is in my node_modules folder. I've deleted and reinstalled the node_modules folder to no avail. What should I do?

pwsses commented 7 years ago

Hi Please check "create empty project" in Wiki url : https://github.com/Samsung/cordova-plugin-toast/wiki/Create-Project If you did it, you can find "inquirer" in node_modules folder.

Create cordova project

$ cordova create TestApp $ cd TestApp

Beware of hidden file

$ cp -rf ../grunt-cordova-sectv/sample/. ./ $ npm install ../grunt-cordova-sectv

Grunt task for build and package

Install dependency modules

$ npm install

For toast browser simulator

$ cordova platform add browser

Mandatory plugins for using browser simulator (not for other platforms)

$ cordova plugin add cordova-plugin-device $ cordova plugin add cordova-plugin-network-information $ cordova plugin add cordova-plugin-globalization

Add toast plugin

$ cordova plugin add ../cordova-plugin-toast

AhmedGamal-Inmobly commented 7 years ago

@dholbrook86 I had to execute npm install inquirer in all the repos in toast folder and it worked

dholbrook86 commented 7 years ago

@AhmedGamal-Inmobly I did that. So I thought. I really thought I tried everything. Ended up moving on to something else. I was just experimenting anyway. I will have to come back to it later. Thanks for responding though! I appreciate it.

enjikaka commented 7 years ago

@pwsses Following those guidelines; I still end up with Warning: Cannot find module 'inquirer' Use --force to continue. when running grunt sectv-prepare:tv-webos and related commands. The module is in node_modules directory.

rikoopa commented 6 years ago

i have the same issue i installed in all repos the following

cnavarroestrella commented 6 years ago

@rikoopa Thanks for this. Actually, I just needed to do this in toast/grunt-cordova-sectv, so, for anyone coming later:

cd grunt-cordova-sectv
npm install inquirer xml2js mustache js2xmlparser zip-dir

This seems to get rid of the issue.

Titella commented 6 years ago

After solving "inquirer", now I get an error Unexpected token {... Does the same thing happen to you? Any ideas ? I think it has to do with the grunt-cordova-sectv that does not work

grunt sectv-build --verbose --force Initializing Command-line options: --verbose, --force

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks. Initializing config...OK

Registering "grunt-contrib-clean" local Npm module tasks. Reading C:\Projecte Bexfy\SmartTV\template TOAST\TemplateToast\TestApp\node_modules\grunt-contrib-clean\package.json...OK Parsing C:\Projecte Bexfy\SmartTV\template TOAST\TemplateToast\TestApp\node_modules\grunt-contrib-clean\package.json...OK Loading "clean.js" tasks...OK

Registering "../grunt-cordova-sectv/tasks" tasks. Loading "sectv-build.js" tasks...OK

Running tasks: sectv-build

Running "sectv-build" task

Running "sectv-build:sectv-orsay" (sectv-build) task Verifying property sectv-build.sectv-orsay exists in config...OK Files: -> platforms/sectv-orsay/build Warning: Unexpected token { Used --force, continuing.