I'm trying to execute google maps web api for my ionic 2 project.
After adding a proxy (For the browser CORS issue) and executing ionic serve, the following error is returned.
Uh oh! There's a syntax error in your ionic.config.json file:
SyntaxError: Unexpected token in JSON at position 0
at Object.parse (native)
at Object.load (C:\Users\User\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\lib\project.js:48:17)
at Object.runr (C:\Users\User\AppData\Roaming\npm\node_modules\ionic\lib\cli.js:156:32)
at C:\Users\User\AppData\Roaming\npm\node_modules\ionic\lib\cli.js:54:9
at _fulfilled (C:\Users\User\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\User\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\User\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:749:13)
at C:\Users\User\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:557:44
at flush (C:\Users\User\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
The following is my ionic.config.json file:
{
"name": "NW",
"app_id": "",
"v2": true,
"typescript": true,
"proxies": [
{
"path": "/proxy",
"proxyUrl": "https://maps.googleapis.com/"
}
]
}
My System Information is as below:
Cordova CLI: 6.5.0
Ionic Framework Version: 2.0.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 1.0.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.9.5
Xcode version: Not installed
I tried to fix this by checking for foreign tokens and using a newly generated default ionic.config.json but same error persists.
Appreciate any ideas or solutions to this issue.
Thanks.
Open your config file in Notepad++ and check the encoding format. The encoding format should be UTF-8 and nothing else, not even UTF-8 BOM. If it is, change it to UTF-8. save file and try running it again. Hope it helps.
Note: DO NOT USE Notepad to do the above steps, as notepad considers UTF_8 and UTF-8-BOM as same.
Related
First off all excuse the bad english..
Im develop/build using vue3 + vite2.
Deploy the 'dist' folder on AWS EC2 and run the server with nginx.
And when I connect to that page, I get an error that I can't see.
Has anyone ever seen an error like this?
(When build/run locally, it works normally without errors.)
after a day of suffering, i found that it was due vueI18n plugin in the vite.config.ts file.
import vueI18n from '#intlify/vite-plugin-vue-i18n';
import path from 'path';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
plugins: [
vue(),
vueI18n({
include: path.resolve(__dirname, './path/to/src/locales/**'),
}),
],
....
I don't know for what reason,
When I delete that plugin, it worked fine.
the reason for adding vueI18n plugin is because a warning related to bundle install occurred.
i guess is that the plugin conflicts with vite's build environment.
When I require mdbootrstrap in a webpacker pack, the following error is outputed:
Firefox: TypeError: "exports" is read-only
Chrome: Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
Is there a config tweak that I could make to get rid of this error? Or must I just wait for mdbootstrap owner to release a patch for this?
Any help appreciated!
Links:
Github demo app: https://github.com/yoones/rails_6_mdb_through_webpacker
Yarn package.json: https://github.com/yoones/rails_6_mdb_through_webpacker/blob/master/package.json
Webpacker env config: https://github.com/yoones/rails_6_mdb_through_webpacker/blob/master/config/webpack/environment.js
Webpacker pack: https://github.com/yoones/rails_6_mdb_through_webpacker/blob/master/app/javascript/packs/application.js
Versions:
Ruby on Rails 6.0.1
Webpacker 4.2.2
mdbootstrap 4.10.1
Since last week, I have a problem using redmine_backlogs plugin in Redmine. When I try to log time on an issue, I have this error message:
an error occured, please check the server logs (Unprocessable Entity)
Checking production.log, I have these lines:
ActiveRecord::RecordInvalid (Validation failed: Temps passé n'est pas valide):
plugins/redmine_backlogs/lib/backlogs_activerecord_mixin.rb:38:in journalized_update_attributes!'
plugins/redmine_backlogs/app/models/rb_task.rb:138:in update_with_relationships'
plugins/redmine_backlogs/app/controllers/rb_tasks_controller.rb:28:in update'
lib/redmine/sudo_mode.rb:63:in sudo_mode'
Here are the information about my Redmine instance:
Environment:
Redmine version 3.4.5.stable
Ruby version 2.2.4-p230 (2015-12-16) [x86_64-linux-gnu]
Rails version 4.2.8
Environment production
Database adapter Mysql2
SCM:
Subversion 1.9.3
Mercurial 3.7.3
Git 2.7.4
Filesystem
Redmine plugins:
a_common_libs 2.1.10
clipboard_image_paste 1.10
global_roles 2.1.0
google_analytics_plugin 1.0.0
redmine_backlogs v1.0.6
redmine_code_review 0.7.0
redmine_dmsf 1.5.7 devel
redmine_drafts 0.2.0
redmine_issue_templates 0.1.1
redmine_ldap_sync 2.0.8.devel.gf831737c23
redmine_my_page 0.1.10
redmine_scm 0.5.1
redmine_xls_export 0.2.1.t9
Thank you for your help
Mathieu
I am newbie to Django-haystack. I got an error while following Django-Haystack documentation.
Command execution order, I followed:
I started elasticsearch server (1.7.3) using command prompt and I am able to access http://127.0.0.1:9200/
python manage.py rebuild_index
Output:
WARNING: This will irreparably remove EVERYTHING from your search index in connection 'default'.
Your choices after this are to restore from backups or rebuild via the rebuild_index command.
Are you sure you wish to continue? [y/N] y
Error:
packages\haystack\backends\elasticsearch_backend.py", line 28, in
raise MissingDependency("The 'elasticsearch' backend requires the installation of 'elasticsearch'. Please refer to the documentation.")
haystack.exceptions.MissingDependency: The 'elasticsearch' backend requires the installation of 'elasticsearch'. Please refer to the documentation.
Current Platform (Windows):
1. Django 1.8
2. elasticsearch: 1.9.0 (installed through pip)
3. pyelasticsearch: 0.0.5 (installed through pip)
4. elasticseach: 1.7.3 (downloaded to start elasticsearch server)
I have tried adding the 'elasticsearch' also to my installed apps but the same error exists.
It seems there is version compatibility problems (perhaps in pyelasticseach) as I found some others also faced the same issue. Any help would be appreciated. Thanks.
Environment: MAC - Mountain Lion
I am trying to use the AWS PHP SDK for a project. I followed the Amazon web site's SDK installation directions (through composer) -- using the following Link to AWS
I created the file compser.json. Contens:
{
"require": {
"aws/aws-sdk-php": "2.*"
}
}
From the command line, I typed:
curl -s "http://getcomposer.org/installer" | php
Then
php composer.phar install
A new directory appeared "vendor" and inside it, the AWS SDK 2 was automatically installed.
The problem is that I am expecting (per the code example I'm trying to follow), I am expecting to see the following file:
vendor/aws/aws-sdk-for-php/sdk.class.php
But it's not there. Could this be referencing an older version of the SDK?
The automatically generated by the "php composer.phar install" command: vendor/autoload.php looks like this:
<?php
// autoload.php generated by Composer
require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit25a7292f83dd9a43a459f6c2e51befba::getLoader();
Is it possible that the file: sdk.class.php is valid for version 1 of the SDK, but not version 2?
Entirely correct. sdk.class.php is a file that exists in SDK 1.x, but not 2.x.
The correct instructions are in the SDK2 README.