Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] bug with build in node #14

Open
luan122 opened this issue Aug 3, 2020 · 4 comments
Open

[Bug] bug with build in node #14

luan122 opened this issue Aug 3, 2020 · 4 comments

Comments

@luan122
Copy link

luan122 commented Aug 3, 2020

Version

git latest

Reproduction link

http://none.com

Operating System

windows

Device

iis

Browser & Version

chrome latest

Steps to reproduce

build with ng build, deploy, try to open

What is expected?

the site open

What is actually happening?

Application has thrown an uncaught exception and is terminated:
ReferenceError: window is not defined
at Object. (main.js:1:63)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object. (C:\Program Files\iisnode\interceptor.js:210:1)
at Module._compile (module.js:643:30)


Solution

Additional comments

@rarestoma
Copy link
Contributor

Hi @luan122,

Thank you for working with our products.

Can you please give me all the steps that you did? I tried now 'npm install' -> 'ng build' -> 'cd dist' -> 'ng serve' and it is working fine.

Thank you,
Rares

@luan122
Copy link
Author

luan122 commented Aug 4, 2020

hi @rarestoma i'm trying to execute it with iisnode, i did the steps that u sent
npm install -> ng build -> sent the build to the server and it didn't worked, i tried to execute it in node.js localy as well with node main.js and didn't worked as well only with ng serve but in node no

@rarestoma
Copy link
Contributor

Hi @luan122,

Can you please give me the node commands so I can try it too?

Thank you,
Rares

@JDEE30
Copy link

JDEE30 commented Sep 5, 2020

I'm having this same issue today. (The program won't start)

I followed this guide from the docs @ https://demos.creative-tim.com/paper-kit-2-angular/#/documentation/tutorial
image

When running the first command( npm install -g @angular/cli@latest)

I get the following error:

image

I've done some research on these two issues and I have yet to find a solution that has worked for me.

Stack overflow had some suggestions related to the "npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142"

@https://stackoverflow.com/questions/62528331/how-to-fix-npm-warn-deprecated-request2-88-2-request-has-been-deprecated-see

Please advise what versions of node, npm and angular work with this project as it seems the issue is that I need a different version of one or more of these.

& When running npm install I get the following errors

image
I should note that the package.json file is not actually missing.

Thank you for your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants