Require mdbootstrap through webpacker 4 fails - webpack-4

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

Related

EmberJs new project throws Decorating class property failed

I tried to use ember cli to generate local project, but when visiting localhost:4200, I met below errors:
Error occurred:
- While rendering:
-top-level
application
Uncaught Error: Decorating class property failed. Please ensure that proposal-class-properties is enabled and runs after the decorators transform.
and ember -v gives this:
ember-cli: 3.28.4
node: 16.13.1
os: darwin x64
Please help to point out the reason.
Thanks
In your package.json change
"ember-cli-babel": "^7.26.6"
to
"ember-cli-babel": "7.26.6"
the credit for the answer goes to the Ember community on Discord

Error: Custom: Invalid blockhash when solana program deploy

Trying to deploy a program to solana devnet.
I was using
solana program deploy ./path/xxxx.so -u devnet
And I got multiple lines of
msg 21AbKBwMcsDR4DciR6Z69X6vrqVj7uHKg2Wf1ap8FB1J
msg 21AbKBwMcsDR4DciR6Z69X6vrqVj7uHKg2Wf1ap8FB1J
msg 21AbKBwMcsDR4DciR6Z69X6vrqVj7uHKg2Wf1ap8FB1J
msg 21AbKBwMcsDR4DciR6Z69X6vrqVj7uHKg2Wf1ap8FB1J
msg 21AbKBwMcsDR4DciR6Z69X6vrqVj7uHKg2Wf1ap8FB1J
It gave me this error in the end
Error: Custom: Invalid blockhash
Tried search online but didn't get any useful informations
I was able to resolve this error by reverting to earlier versions of solana-cli and anchor-cli
solana-cli 1.8.0 (src:4a8ff62a; feat:1813598585)
anchor-cli 0.18.2
rustc 1.57.0 (f1edd0429 2021-11-29)
I also shared the above solution in this related github issue
One guess I have is that ExitStatus(unix_wait_status(256)) (which was in my error logs) could be a "time out error" from waiting too long due to slower deployment validation.
I did notice my deployments using later versions (solana-cli 1.9.1, anchor-cli 0.20.1) being significantly slower, especially for larger programs (my small program deployments were still working fine). These were the versions that showed similar "msg" logging as OP.
UPDATE:
Nowadays, my most fool proof solution is to run the snippet below before deployments
sh -c "$(curl -sSfL https://release.solana.com/v1.8.13/install)"
For deploying to devnet via Anchor, the error I got:
Error: Custom: Invalid blockhash
There was a problem deploying: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "" }.
I have solved this:
Local npm package: #project-serum/anchor 0.20.1
Solana program dependencies: anchor-lang 0.20.1, anchor-spl 0.20.1, solana-program 1.9.4
deploy to devnet: failed
Local npm package: #project-serum/anchor 0.19.0
Solana program dependencies: anchor-lang 0.19.0, anchor-spl 0.19.0, solana-program 1.9.4
deploy to devnet: successful or failed
Local npm package: #project-serum/anchor 0.18.2
Solana program dependencies: anchor-lang 0.18.2, anchor-spl 0.18.2, solana-program 1.9.4
deploy to devnet: successful or failed
in all cases, the global environment is the same:
Rust 1.57.0
solana-cli 1.9.4
#project-serum/anchor-cli 0.20.1
it seems sometimes the transaction may fail and those transactions include program deployment. see reference: https://www.brianfriel.xyz/resending-dropped-transactions-on-solana/
This seems to be only because of anchor's version, I had the following versions installed:
Rust 1.59.0
solana-cli 1.9.6
anchor-lang 0.22.1
I couldn't deploy to devnet because of
Error: Custom: Invalid blockhash
There was a problem deploying: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "" }.
So I just changed anchor-lang to 0.22.0 and all worked well.
That's very strange, and not the normal output that you should get while deploying a program. Have you tried updating to the latest Solana SDK, which is 1.9.2 at the time of writing? More docs at https://docs.solana.com/cli/install-solana-cli-tools#use-solanas-install-tool
I just tried this on devnet, and got the following output:
$ solana program deploy path/to/program.so -u devnet
Finding leader nodes...
[x/y] Transactions sent...
[x/y] Transactions confirmed. Retrying in z blocks.
Program Id: 6sxk3XpYapcRnpSwRKFS1nGK9MJpm8Jkb9aofnBcG1p8
For Mac M1,
Rust 1.57.0
solana-cli 1.8.0
#project-serum/anchor-cli 0.20.1
these tools' versions work.
I tried myself.
https://github.com/project-serum/anchor/issues/1157#issuecomment-1065828414
try solana cli 1.8.12 as 1.9.* seems to have issues deploying on devnet
I had similar error in chainlink contract github example. I changed this line in Execute Struct
pub system_program:Program<'info,System>,
to this:
#[account(address=system_program::ID)]
/// CHECK:
pub system_program:AccountInfo<'info>,
I had to import system_program
use anchor_lang::solana_program::system_program;
for me, to solve it my solana-cli version was 1.9.4 and I just updated with
solana-install update
and it's downgraded to 1.8.16 and deployed my program without any problem.
before this I can't deploy using anchor test(process) or solana program deploy.
Also, If you upgrade to one of the 1.10.X versions the issue will fix.

Bitnami Ghost CMS aws instance Config file is not valid JSON issue

I am setting up ghost cms on aws for a client and hit a wall. I am using the bitnami image for setting this up. I haven't touched the config file that comes default in bitnami image. Ghost is not starting up and it's showing this error in the log
Debug Information:
OS: Debian GNU/Linux, v10
Node Version: v10.20.1
Ghost-CLI Version: 1.14.0
Environment: production
Command: 'ghost log'
An error occurred.
Message: 'Cannot read property 'join' of undefined'
Stack: TypeError: Cannot read property 'join' of undefined
at instance.isRunning.then (/opt/bitnami/apps/ghost/lib/node_modules/ghost-cli/lib/commands/log.js:34:88)
at process._tickCallback (internal/process/next_tick.js:68:7)
OK it literally wasted hours of my life. And the problem was found. The reason was that in the config file the url of the blog was given as an IP address. But Ghost has said in it's setup documentation that this is likely to cause issues. So when I changed this to a URL instead of the IP address it was fixed. Hurraaay!!

I have an error with Backlogs plugin in Redmine

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

ionic.config.json syntax error at position 0

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.