Comments (8)
Sorry - It looks like I was in fact using 2.3.0. I've updated to 2.3.1, I think. (As you can clearly tell, I am not at all a software developer haha)
I added npx to the command but I'm still seeing the same error. It does reference the new helpers.js file now though.
PS C:\Users\<UserName>\Documents\<Folder>\new> staticrypt --version
2.3.1
PS C:\Users\<UserName>\Documents\<Folder>\new> npx staticrypt .\proveYourself.html <Password>
C:\Users\<UserName>\Documents\<Folder>\new\node_modules\staticrypt\cli\helpers.js:123 .replaceAll(/^.*\brequire\(.*$\n/gm, ""); ^
TypeError: fs.readFileSync(...).replaceAll is not a function
from staticrypt.
Got it! I think. What's your node version, is it lower than 16?
I could reproduce in node 12, it looks like String.replaceAll
doesn't exist in this node version.
I've just uploaded the patch in 2.3.2 - let me know if that fixes it for you.
from staticrypt.
Better than awesome. All working perfectly this morning - thanks so much for your swift response. And, of course, for all the work hitherto!
from staticrypt.
Thanks for reporting - which version of staticrypt are you using? If you're on >=2.2
there has been some changes to the code in the past few weeks and lots of refactoring, an edge case bug might have gone through.
I tried to copy your directory structure but can't reproduce your issue so far. Where are you calling the npx command from, is that the root directory of your project?
I did noticed there was a function that didn't handle filepath exactly properly, I couldn't hit a bug with it but maybe that caused an issue in your case. I've made the function more resilient and added more verbose logging to the error you encountered - I've just pushed it to 2.3.1
on npm. Can you update and let me know how it goes?
If you need to have a working version asap you can also downgrade to <2.2 (~2.1.1
), which is before the recent changes, but I'd be interested to understand what's going wrong in your case.
from staticrypt.
Hi Robin - I am also running into the same issue.
Coincidentally I was trying to debug the same problem only a few minutes before you posted your comment above.
I've just updated and I am still seeing the issue that the user above mentioned.
+ [email protected] updated 1 package and audited 29 packages in 0.36s
staticrypt .\proveYourself.html <MyPasswordHere>
C:\Users\<MyUserName>\AppData\Roaming\npm\node_modules\staticrypt\lib\formater.js:17 .replaceAll(/^.*\brequire\(.*$\n/gm, ""); ^
Thank you for all your help!
from staticrypt.
Hi @AnzuTwo - thanks for sharing your details. Interesting to see the problem appears in a simple file structure as well.
Same question, are you calling the command from your project root directory? I don't see the npx
in the npx staticrypt
command, are you calling the a globally installed staticrypt?
The error you're posting is pretty weird for that version - I've moved the method in 2.3.1, and the line containing .replaceAll(/^.*\brequire\(.*$\n/gm, "");
isn't in formater.js
any more (and it should also give a more verbose error message now). Are you sure you are calling the latest version when running the command?
from staticrypt.
Node version is v12.19.0.
I updated to 2.3.2, tried again, and it worked! I have the encrypted file!
Thanks a lot for the help, this was fun. Very glad I was able to find this thread (:
from staticrypt.
Awesome! Thank you both for updating & posting the detail of your errors, this is helping others too.
from staticrypt.
Related Issues (20)
- Security policy HOT 3
- Feature: Allow for multiple passwords for decryption HOT 4
- [RFC] Raising PBKDF2 iterations, password strength and StatiCrypt security model HOT 3
- Upgrading your password_template
- Add custom styling HOT 3
- Support encrypting multiple files at once
- Change the CLI signature to be more consistent and flexible
- Remove as much of the code from password_template to allow non-breaking updates
- Make webcrypto engine the only available
- Add confirmation prompt when using a weak password
- Cannot destructure property 'subtle' of 'crypto' as it is undefined. HOT 11
- Missing Package in Latest Release 3.1.0 HOT 2
- Error: Cannot find module 'node:crypto' HOT 3
- Feature: Support usernames, with database HOT 6
- Nothing is happening when clicking "decrypt" on encrypted pages HOT 2
- The `--remember false` option does not work HOT 1
- Page not protected until reload HOT 7
- Question - Is it possible to still use CryptoJS? HOT 4
- setup doesn't work reliably & no CSS HOT 5
- Did not generate encrypted content with "--share" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from staticrypt.