paper-kit-2-angular icon indicating copy to clipboard operation
paper-kit-2-angular copied to clipboard

[Bug] bug with build in node

Open luan122 opened this issue 5 years ago • 4 comments

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

luan122 avatar Aug 03 '20 14:08 luan122

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

rarestoma avatar Aug 04 '20 14:08 rarestoma

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

luan122 avatar Aug 04 '20 15:08 luan122

Hi @luan122,

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

Thank you, Rares

rarestoma avatar Aug 05 '20 07:08 rarestoma

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 [email protected]: request has been deprecated, see https://github.com/request/request/issues/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.

JDEE30 avatar Sep 05 '20 17:09 JDEE30