I’m trying to integrate CleverTap into my Next.js app. Followed the documentation Web SDK Quick Start Guide but facing issue: Server Error ReferenceError: window is not defined in Next.js _app.tsx cleverTapHelper.ts cleverTap.d.ts Window object should not be undefined but getting undefined! What’s going on? Answer This is because NextJS is trying to execute that function on the server because it
Tag: npm
Import two files
Recently started learning imports and faced the following problem After installing the package in gulpfile, you need to make the following entry: Can I somehow make this record using import? The only thing that comes to my mind is: But there one variable is assigned two values, and here, in fact, there are 2 “variables” and it turns out somehow
React is not getting uninstalled in windows
I am not able to uninstall react app in windows 10. I tried everything which is in stackoverflow but it is not getting uninstalled. I am using npm . Even I removed nodejs, still it is not working. I actually need to use latest version so when I installed nodejs and react again it is still picking old version of
Disable integrity check for local dependency in package-lock.json
How can I disable the integrity check for a local dependency in package-lock.json? In my repository, I have a base library as well as two Angular apps with both use my base library as dependency. Unfortunately, the integrity sha512 of the base library is with every build different, and npm fails installing the dependencies. This is what it outputs: Excerpt
Integrating npm module into a plain Javascript app, don’t know how to fix error
I apologize, my lack of knowledge of how to build modern Javascript apps is showing. We have a Capacitor app that uses plain Javascript, without any build tools. This works fine. We’re trying to add Microsoft Code Push support, via https://github.com/mapiacompany/capacitor-codepush, and we’re running into a problem with how to integrate it into our app. For Capacitor and its plugins,
Why do we install dependencies during Docker’s final “CMD” command, in development?
I’m working through a book about bootstrapping microservices, and the author provides the following dockerfile, which is meant to be used in development.** The CMD command here is obviously somewhat unusual. The rationale provided is as follows: By doing the npm install when the container starts, we can “make use of npm caching so it’s much faster to install at
options.domAPI is not a function
I’ve tried adding stylus config of Vuetify to modify the global variables, until I noticed that it’s not supported anymore. I’ve run this command to install the required loaders: npm i –save-dev stylus stylus-loader css-loader style-loader. After that, I started getting the error in the title, and after removing those libraries, it didn’t remove it at all. I’ve tried running
ParcelJS: Build HTML to different subdirectories using the same code
I have two .html files using the same Javascript code and assets. As they are representing different language versions of the same site, I would like to build them to different subdirectories with parcel. Currently, I’m building these in an asymmetric way. The .html files are the entry points, index.html being the English language version: Current input: Current output: Current
How do I update the entries in package.json automatically?
I have package.json which is below Now, I want to update “name” from b to new-b. How can I do that programmatically? I tried npm config set command, but it does not update package.json file Please let me know Thank you Answer If you’re trying to use the CLI to modify the package properties, you should be able to use
Can’t npm install local dependency
I’ve been using npm install react-financial-charts successfully. However, I want to include this package locally instead (for reasons), so I checked out the master branch of react-financial-charts from Github. I now have two folders: Inside of my project, my package.json contains: npm run dev will now encounter the compile error corresponding to a basic import statement import { BarSeries }