twurple | Interact with Twitch 's API , chat and subscribe to events | Chat library
kandi X-RAY | twurple Summary
kandi X-RAY | twurple Summary
A set of libraries that aims to cover all of the existing Twitch APIs.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of twurple
twurple Key Features
twurple Examples and Code Snippets
Community Discussions
Trending Discussions on twurple
QUESTION
Somewhere along the lines of updating my node version / dependencies for both machines, I noticed that building my app in production on another machine outputs an error while building for production on my main machine does not.
The errors go away if I move the affected devDependencies to the dependencies array in my package.json
, but that's more of a workaround and I would like to know why I'm seeing the different behavior.
As far as I understand, when running npm install
in production, it will not install my dev dependencies.
This is fine since I tested this on my dev machine, and the app built fine even without my dev dependencies.
However, in production, I get errors such as these:
Cannot find module 'sinon' or its corresponding type declarations.
Could not find a declaration file for module 'cors'. '/home/ubuntu/brobot/source/node_modules/cors/lib/index.js' implicitly has an 'any' type. Try `npm i --save-dev @types/cors` if it exists or add a new declaration (.d.ts) file containing `declare module 'cors';
They go away if I move the affected packages to the dependencies array instead of dev dependencies, but why? And why does it build fine without my dev dependencies on my dev machine?
Here are my configurations:
package.json
shortened:
ANSWER
Answered 2022-Mar-24 at 16:34sinon is a dev dependency so it's not bundled for production. If you need it for production you can add it to a dependency, if not you can remove the reference to sinon and rebundle and it should resolve itself.
Edit 1:
The errors go away if I move the affected devDependencies to the dependencies array in my package.json
I initially glossed over this. Yeah, it sounds like you are using these libraries in your production code but since they aren't in dependencies they aren't included in your production bundle. They work in development because you have them as dev dependencies.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install twurple
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page