Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error running 'ember generate cordova-init com.test.app' #175

Open
deepflame opened this issue Nov 11, 2015 · 8 comments
Open

error running 'ember generate cordova-init com.test.app' #175

deepflame opened this issue Nov 11, 2015 · 8 comments

Comments

@deepflame
Copy link
Contributor

When I run it I get the following:

ember-cli-cordova: You must specify the locationType as 'hash' in your environment.js or rename it to defaultLocationType.
Error: ember-cli-cordova: You must specify the locationType as 'hash' in your environment.js or rename it to defaultLocationType.
    at Class.module.exports.config (./node_modules/ember-cli-cordova/index.js:24:15)
node: 4.2.1
npm: 2.13.4
os: darwin x64

Any idea?

@deepflame
Copy link
Contributor Author

cordova: 5.4.0
ember-cli: 1.13.8

@deepflame
Copy link
Contributor Author

ok, found it.

Guess this is missing in the documentation somewhere. I had to change my 'locationType' to 'hash' as it is written in the error message.

excerpt from the code:

if (config.locationType && config.locationType !== 'hash') {
  throw new Error('ember-cli-cordova: You must specify the locationType as \'hash\' in your environment.js or rename it to defaultLocationType.');
}
conf.locationType = 'hash';

Not sure if this is a bug or if the documentation should just be updated.

@dukex
Copy link
Contributor

dukex commented Nov 14, 2015

@deepflame In Getting Started:

Once your project is set up, you're ready to start developing. We've tried to keep the experience as similar to ember-cli as possible. You just need to move your locationType setting in config/environment.js to defaultLocationType so that it'd be used when not building for cordova (cordova needs hash as locationType).

@deepflame
Copy link
Contributor Author

@dukex Thanks for the pointer.

It just happens already with ember generate cordova-init (Setting up the app). The part you are referring to is from "Developing the app".

So I guess this part should be in "Setting up the app" as well.

deepflame added a commit to deepflame/ember-cli-cordova that referenced this issue Nov 16, 2015
@deepflame deepflame mentioned this issue Nov 16, 2015
@litao10422
Copy link

git clone https://github.com/poetic/ember-cli-cordova.git
cd ember-cli-cordova
npm i

68182 verbose install:[email protected] Error: ENOENT: no such file or directory, chmod 'C:\MyWorkSpace\Dvlp\Trial\ember-cli-cordova\node_modules\ember-cli\node_modules\broccoli\node_modules\handlebars\node_modules\uglify-js\bin\uglifyjs'
.....
.....
68201 verbose stack Error: ENOENT: no such file or directory, chmod 'C:\MyWorkSpace\Dvlp\Trial\ember-cli-cordova\node_modules\ember-cli\node_modules\broccoli\node_modules\handlebars\bin\handlebars'
68201 verbose stack at Error (native)
68202 verbose cwd C:\MyWorkSpace\Dvlp\Trial\ember-cli-cordova
68203 error Windows_NT 10.0.10586
68204 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "i"
68205 error node v5.5.0
68206 error npm v3.3.12
68207 error path C:\MyWorkSpace\Dvlp\Trial\ember-cli-cordova\node_modules\ember-cli\node_modules\broccoli\node_modules\handlebars\bin\handlebars
68208 error code ENOENT
68209 error errno -4058
68210 error syscall chmod
68211 error enoent ENOENT: no such file or directory, chmod 'C:\MyWorkSpace\Dvlp\Trial\ember-cli-cordova\node_modules\ember-cli\node_modules\broccoli\node_modules\handlebars\bin\handlebars'
68211 error enoent This is most likely not a problem with npm itself
68211 error enoent and is related to npm not being able to find a file.
68212 verbose exit [ -4058, true ]

ember -v
version: 1.13.15
node: 5.5.0
npm: 2.14.10
os: win32 x64
npm -v
3.3.11

any idea?
Thanks in advance.
npm-debug.zip

@deepflame
Copy link
Contributor Author

@litao10422 this seems to be a different issue. Any reason you clone the repo instead of installing the plugin as described in the "Getting started" guide?

@litao10422
Copy link

I installed the plugin following the "Getting started" guide. Then I tried to clone the repo but failed, then I want to know how to resolve those error.
Anyway, could you teach me in which file to override the EMBER_CLI_CORDOVA environment variable? config/environment.js?
EMBER_CLI_CORDOVA=0 ember serve
Thank you.

@deepflame
Copy link
Contributor Author

@litao10422 personally I have no idea as I have not used the plugin myself so much yet. Maybe you open a new issue for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants