Dont work on node because of window
See original GitHub issueDescribe the bug Dont work on node due to use of window obj
To Reproduce
import Auth from '@aws-amplify/auth'
import Amplify from '@aws-amplify/core'
Expected behavior No errors Desktop (please complete the following information): Node 10 “@aws-amplify/auth”: “^1.2.5-unstable.3”, “@aws-amplify/core”: “^1.0.14-unstable.0”
Additional context
ReferenceError: window is not defined
at Object.<anonymous> (C:\Dev\PycharmProjects\dailyidea\front\node_modules\@aws-amplify\core\lib\RNComponents\index.js:24:20)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (C:\Dev\PycharmProjects\dailyidea\front\node_modules\@aws-amplify\core\lib\index.js:39:10)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
How to resolve 'node' is not recognized as an internal or ...
Open the Environment Variables option in your Control Panel. · Select the variable named Path. · Restart the command prompt again and now...
Read more >node.js - 'node' is not recognized as an internal or an external ...
In Windows, you need to set node.js folder path into system variables or user variables. 1) open Control Panel -> System and Security...
Read more >Why does node.exe always popup a new window in Windows?
Seems it'a problem related to powershell , I tried cmd.exe with node minutes ago, it works fine. I tried other command-line program in ......
Read more >Set up Node.js on WSL 2 - Windows - Microsoft Learn
A guide to help you get your Node.js development environment set up on Windows Subsystem for Linux (WSL).
Read more >How to resolve the “node is not recognized as an internal or ...
Sometimes even after successful installation of Node.js, the error keeps on appearing; this is because the environment variable is not set properly.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@aldarund sorry about that. I submitted another one for this issue.
Just for some context here on the overall goals for amplify. Amplify is a client side library and we want to stay focused on that (client-side not server-side, browser, mobile, RN etc). Adding actual support for node/server would take a lot more than just a global polyfill for example, a fetch polyfill, localstorage/cache, cookies etc. (and more). So adding a polyfill to just fill this window global object would not give support for node and we don’t want to confuse people by implying our support for it further.