amplify-js: "WINDOW NOT DEFINED"... again :-(
Describe the bug Importing the latest aws-amplify into a nuxt application crashes with a “Window not defined” error
To Reproduce In a Nuxt Js application (and probably any SSR framework), try to import the latest aws-amplify
Expected behavior Should not crash
Additional context Most certainly a regression for #3477
My latest working config is with aws-amplify version 1.1.36 with the following resolutions in package.json:
"resolutions": {
"@aws-amplify/analytics": "1.2.23",
"@aws-amplify/api": "1.0.42",
"@aws-amplify/auth": "1.2.31",
"@aws-amplify/cache": "1.0.32",
"@aws-amplify/core": "1.1.0",
"@aws-amplify/interactions": "1.0.35",
"@aws-amplify/predictions": "1.0.3",
"@aws-amplify/pubsub": "1.1.0",
"@aws-amplify/storage": "1.1.0"
}
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 4
- Comments: 29 (4 by maintainers)
Commits related to this issue
- fixed #4243 issue that window object exists in the bundle file which causes issues in Node env. — committed to Amplifiyer/amplify-js by Amplifiyer 5 years ago
- fixed #4243 issue that window object exists in the bundle file which causes issues in Node env. (#4255) — committed to aws-amplify/amplify-js by Amplifiyer 5 years ago
- fixed #4243 issue that window object exists in the bundle file which causes issues in Node env. (#4255) — committed to Amplifiyer/amplify-js by Amplifiyer 5 years ago
- fixes #4243 #4576 #4599 Correctly identify the nodejs environment. — committed to Amplifiyer/amplify-js by Amplifiyer 5 years ago
- fixes #4243 #4576 #4599 Correctly identify the nodejs environment. (#4611) * fixes #4243 #4576 #4599 Correctly identify the nodejs environment. * Fix typo in function signature * Revert back th... — committed to aws-amplify/amplify-js by Amplifiyer 5 years ago
- fixed #4243 issue that window object exists in the bundle file which causes issues in Node env. (#4255) — committed to computationalcore/amplify-js by Amplifiyer 5 years ago
- fixed #4243 issue that window object exists in the bundle file which causes issues in Node env. (#4255) — committed to CongNguyen086/amplify-js by Amplifiyer 5 years ago
Confirmed working using
@aws-amplify/api@^1.2.4-unstable.3and@aws-amplify/auth@^1.4.4-unstable.3.@Amplifiyer shouldn’t this issue be reopened ?
Still getting this issue.
@Amplifiyer , i installed new versions of Amplify and Amplify React. Window Not Defined Error is gone.
and now “navigator is not defined”
not working on me
@aws-amplify/core/dist/aws-amplify-core.js:10:4
my version is 1.2.4-unstable.5
I am seeing the same error when trying to run a next js app.
aws-amplify@1.2.2in package.json