Wednesday, 31 May 2017

Command "npm run tsc" does not work in an offline machine - trying to compile node_modules libraries

I want to execute the following commands in an offline machine (A) but the seconds point does not work:

  1. npm install
  2. npm run tsc

We have a machine (A) that contains my TypeScript APP and another machine (B) that acts as Artifactory (contains all the npm dependencies).

The problem here:

  • I cannot connect the machine A to B due to proxy restrictions.

My idea was to install my TypeScript APP into another machine (C) that does not have proxy restrictions doing the following "steps":

  1. "npm install" (download the dependencies)
  2. "npm run tsc" (to verify everyting compile)
  3. TAR the folder "node_modules"
  4. Copy the TAR from machine C to A
  5. Untar "node_module.tar" as "node_module" folder

The problem here is after executing "npm run tsc" there are a lot of "node_modules" ERRORs and I don't understand why.

FYI - I could change the machine A to be online temporary and "npm install" + "npm run tsc" worked properly. Then, I think there is something bad in the previous "steps".

Info about my installations:

bash-4.2# npm -v
3.10.10
bash-4.2# node -v
v6.9.5
bash-4.2# tsc -v
Version 1.8.10

Many thanks!



via pakOverflow

No comments:

Post a Comment