Skip to main content

There is a problem with building a project .

The package version is as follows - “@amplitude/analytics-browser”: “^2.9.3”.  

We are using next.js (app router)

During the project build the following error appears because of which we can't build the project - 
Amplitude Logger tError]: Failed to set cookie for key: AMP_TEST. Error: Cannot set properties of undefined (setting 'cookie')

Can anyone help solve this problem?

@Denis Turinge Were you ever able to find a resolution? Getting the same error as well.


Up! Experiencing this now.


+1 I am seeing this as well!

    "@amplitude/analytics-browser": "2.22.0",
"@amplitude/analytics-react-native": "1.5.3",
"@amplitude/experiment-js-client": "1.15.1",
"@amplitude/experiment-react-native-client": "1.4.1",

 


Up! Experiencing this now.

Okay, found the solution for me. I am using amplitude on react native and I disabled the cookies by adding:
 

amplitude.init({
...
disableCookies: true,
...
})



Hope it works for you all!


Up! Experiencing this now.

Okay, found the solution for me. I am using amplitude on react native and I disabled the cookies by adding:
 

amplitude.init({
...
disableCookies: true,
...
})



Hope it works for you all!

Thanks, this seems to have done the trick. Are we loosing any explicit functionality on our Native mobile platforms by passing `disableCookies: true` to the `Amplitude.init` call?