Smooch NPM package not installing JS file - smooch

I am trying to integrate smooch into my React app via an npm install, but the smooch directory in my node_modules does not include any JS files upon installation. Using smooch with the scripts works, though. What am I doing wrong that the smooch directory in node_modules does not include the JS file?

This was a bug in v4.4 of the smooch npm package. v4.5.1 Fixes this issue.

Related

How to send emails with smtpjs in reacts without typescript

I tried creating a contact form with SMTP js in react but it did not work tried checking stack over flow but no good answer for using only react not typescript
I was expecting the stmp is to be installed like normal swiper
Because I'm still a junior frontend dev 🤧
You can also find more information and documentation on using smtp.js in React app on the following resources:
Official smtp.js documentation: https://github.com/kimmobrunfeldt/smtp.js
SMTP in Node.js: https://nodemailer.com/smtp/
this also explains better:
https://victorbruce82.medium.com/how-to-send-emails-using-react-through-emailjs-no-server-code-needed-8e1453ef8796
Yes, you can install smtp.js in a similar way to installing other packages in your React app. You can use npm or yarn to install it:
CODE :
npm install smtpjs
or
yarn add smtpjs
After installation, you can import and use smtp.js in your React component.

'react-scripts' is not recognized as an internal or external command, operable program or batch file. json file deleted

the errror is 'react-scripts' is not recognized as an internal or external command,
operable program or batch file.
ive tried
npm install
npm install react-scripts --save
npm i -g react-scripts
https://github.com/mareyam/Complete-Maryam-s-Restaurant
i uploaded this code on github without .json file
now im trying to donwnload and use it but cant because ,json file ive lost. ive tried using json file from anothr project but not working
I would recommend using create-react-app to build this project. Run the command, cd into the directory then start the app.
npx create-react-app name_of_app
cd name_of_app
npm start
This will be good enough for development, and you can add all your components into the src/ folder. Here's the documentation for how to start building react web apps.
To get the production build (which I think is what you're trying to go for), run npm run build which will save the build in the build/ folder.
Any time you use a different machine, just pull the project from github and run npm i. I'm assuming that you were talking about the package.json file. This shouldn't be a big deal if you set everything up correctly.

installing a downloaded library from github into vue project instead of just using npm

I'm having no luck installing https://github.com/MadimetjaShika/vuetify-google-autocomplete library using npm. I'm new to using vue, and I'd like to install the prerelease developers build, 2.0.0-Alpha.9, as the old one doesn't work with my version of vuetify.
I've downloaded and extracted the zip file and then used npm install (filepath of the downloaded folder), however when i run the project I get a 'can't find module 'vuetify-google-autocomplete' error. I've only installed packages directly via npm before so I'm not sure what I'm doing wrong.
You can install a specific version of a npm module by using npm tags
npm i vuetify-google-autocomplete#2.0.0-Alpha.9
You are unable to run it because what you downloaded is an npm repo by itself.
Go to the source folder , run the command npm install , then npm run build, copy the dist folder output to your project. How include that as a module and try.

Installing livescript and prelude-ls with npm and a gulpfile - is there no prelude-browser?

I have installed and used livescript and its prelude-ls library with bower successfully. I loaded prelude-browser-min.js:
// gulpfile
'static/bower_components/prelude-ls/browser/prelude-browser-min.js',
and I was able to import functions in my application code: {map, filter, lines} = require 'prelude-ls'.
Now I'm removing bower from my stack. I also install livescript and a prelude-ls package with npm but there is no prelude-browser-min.js file anymore (though the doc says to use that). As for javascript files there are a few under a lib directory: index.js, Obj.js, etc. I tried to load them all (prelude-ls/**/*.js) but there is a module.exports line somewhere in them and it fails to load my app ("module is not defined").
If there is no prelude-browser-min.js, how can I do ?
update: related issue: https://github.com/gkz/prelude-ls/issues/73
Allright, I'll keep bower for that then !

what a part does bower/bower-asset play in php application such as yii2

Recently I deployed some projects like trntv/yii2-starter-kit and so on.but all applications are publishing assets on '#vendor/bower' instead of'#vendor/bower/bower-asset'. I have read the question Yii2 Composer manage package in bower and bower-vendor and solved it . but I still feel confused about the directory vendor/bower/bower-asset.
What's the part does bower/bower-asset play in php application? it is not a composer package but many theme store in there. Furthermore, bower is a dependency management for javascript just like Composer for PHP , but how does it solve dependency for js package by PHP on this occasion that I have not install node.js environment?
The idea of Composer Asset Plugin is to download Bower / NPM packages and manage their dependencies without having Node JS, Bower and NPM installed (through PHP / Composer). Also it adds possibility to add JavaScript dependencies for PHP packages that use JavaScript libraries.
See for example yii2-bootstrap Yii2 extension (PHP) has a dependency on Bootstrap (JS + CSS):
"bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*"
When you run composer install or composer update, all JS dependencies will be installed to vendor/bower folder.
This is built into the core, but very ambiguous, receives a lot of criticism and there are plans to remove it in 2.1.0 (as far as I remember, it was included before release of 2.0 even it was unstable). Unfortunately this is required and there is no normal way to disable it.
You can read more info on the extension's Github page.
As for folder name, it should be named bower, not bower-asset, if you installed everything correctly.
It's named like so automatically, make sure you have the latest version of plugin:
composer global require "fxp/composer-asset-plugin:~1.1.1"
I'd recommend to even switch to:
composer global require "fxp/composer-asset-plugin:*"
If you have problems or errors, execute:
composer global remove "fxp/composer-asset-plugin"
Then reinstall it again, delete vendor and composer.lock in your application folder and run:
composer install