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

Provides ng goal for angular-cli #443

Closed
softdays opened this Issue Jul 4, 2016 · 18 comments

Comments

Projects
None yet
10 participants
@softdays

softdays commented Jul 4, 2016

It would be awesome to get support for angular-cli

@eirslett

This comment has been minimized.

Owner

eirslett commented Jul 4, 2016

You can do it if you define npm scripts, and use the npm mojo ;-)

@eirslett eirslett closed this Jul 4, 2016

@softdays

This comment has been minimized.

softdays commented Jul 4, 2016

Yes exactly the same job you performed with gulp

@francisoud

This comment has been minimized.

francisoud commented Jul 21, 2016

@eirslett Can you provide an example on the wiki page: https://github.com/eirslett/frontend-maven-plugin/wiki
I didn't knew it was possible until I decided to create an issue to add this feature and found this one ;)
It would be easier to find ;)

@francisoud

This comment has been minimized.

francisoud commented Sep 1, 2016

For the record, here's what has to be done:

pom.xml

    <build>
        <plugins>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <executions>
...
                    <execution>
                        <id>npm run-script prod</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>run-script prod</arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
...

package.json

{
  "name": "myapp"
,...
  "scripts": {
...    "e2e": "protractor",
      "prod": "ng build -prod"
  },
@legolas

This comment has been minimized.

legolas commented Nov 16, 2016

Thanks this helped me!

@vorgg

This comment has been minimized.

vorgg commented Nov 16, 2016

The POM excerpt provided by francisoud seems to work great if you already have Angular-CLI installed on the machine you are running the build on; however, if you don't have Angular-CLI installed and can't install it on the build machine due to say company policies is there a way to install Angular-CLI similarly to how you can use the plugin to temporarily install Node/NPM, Bower, Grunt?

I attempted it by using the following excerpt from my POM that uses the frontend plugin. I tried it with and without both the --no-optional and -g flags, but found that the inclusion of both those flags was what yielded more success although doing a global install seems odd to me for these purposes.

I'm not trying to install Angular-CLI on my build box for any other reason than to build my Angular 2 project and store it in a WAR. When I run the build on my development box where Angular-CLI is installed, I get a success and a resulting WAR that is deployable. I'm trying to reach the same state on our build system (TeamCity).

Anyway, the error I'm encountering is that with this POM, I seem to get Angular-CLI installed, but when it tries to call Angular-CLI with the ng command defined in the package.json to do the actual build, the ng command cannot be found, so I assume it's not in the path or something like that or maybe Angular-CLI doesn't actually get installed.

Please see the build log excerpt below showing a suspected problem with node-sass errors and later not being able to find the ng command. Again this POM works as desired on my development box where I have Angular-CLI installed, but I cannot do a normal install of Angular-CLI on our enterprise build servers, so I'm trying to do the temporary install option with the plugin like it can do with bower and grunt.

If I don't have Angular-CLI successfully installed on the machine I'm building on, the script ng command that francisoud suggests fails. Is there a different goal definition or method for installing Angular-CLI so I can use the script ng command that francisoud suggests?

Thanks!

POM Excerpt ...

<build>
    <plugins>
...    
      <plugin>
        <groupId>com.github.eirslett</groupId>
        <artifactId>frontend-maven-plugin</artifactId>
        <version>${frontend.maven.plugin}</version>
        <configuration>
          <nodeVersion>${node.version}</nodeVersion>
          <npmVersion>${npm.version}</npmVersion>
        </configuration>
        <executions>
          <execution>
            <id>install node and npm</id>
            <goals>
              <goal>install-node-and-npm</goal>
            </goals>
          </execution>
          <execution>
            <id>npm install</id>
            <goals>
              <goal>npm</goal>
            </goals>
            <configuration>
              <arguments>install --production</arguments>
            </configuration>
          </execution>
          <execution>
            <id>angular-cli install</id>
            <goals>
              <goal>npm</goal>
            </goals>
            <configuration>
              <arguments>install --no-optional -g angular-cli</arguments>
            </configuration>
          </execution>
          <execution>
            <id>npm run-script prod</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>npm</goal>
            </goals>
            <configuration>
              <arguments>run-script prod</arguments>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <warSourceDirectory>dist</warSourceDirectory>
          <failOnMissingWebXml>false</failOnMissingWebXml>
        </configuration>
      </plugin>
    </plugins>
  </build>

Package.json Excerpt ...

    "scripts": {
    "start": "ng serve",
    "lint": "tslint \"src/**/*.ts\"",
    "test": "ng test",
    "pree2e": "webdriver-manager update",
    "e2e": "protractor",
    "prod": "ng build --prod --base-href /startoverui/ "

Build Log Excerpt ...

[16:32:29][c.t.c.x.so:startoverui] [INFO] Running 'npm install --no-optional -g angular-cli --color=false' in /opt/teamcity-agent/work/ef08c3902e9a13fc/startoverui
[16:32:51][c.t.c.x.so:startoverui] [ERROR] npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
[16:32:56][c.t.c.x.so:startoverui] [ERROR] npm WARN deprecated lodash-node@2.4.1: This package is discontinued. Use lodash@^4.0.0.
[16:33:09][c.t.c.x.so:startoverui] [ERROR] npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
[16:33:09][c.t.c.x.so:startoverui] [ERROR] npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
[16:34:09][c.t.c.x.so:startoverui] [INFO] /opt/teamcity-agent/work/ef08c3902e9a13fc/startoverui/bin/ng -> /opt/teamcity-agent/work/ef08c3902e9a13fc/startoverui/lib/node_modules/angular-cli/bin/ng
[16:34:10][c.t.c.x.so:startoverui] [INFO] 
[16:34:10][c.t.c.x.so:startoverui] [INFO] > execSync@1.0.2 install /opt/teamcity-agent/work/ef08c3902e9a13fc/startoverui/lib/node_modules/angular-cli/node_modules/execSync
[16:34:10][c.t.c.x.so:startoverui] [INFO] > node install.js
[16:34:10][c.t.c.x.so:startoverui] [INFO] 
[16:34:11][c.t.c.x.so:startoverui] [INFO] [execsync v1.0.2] Attempting to compile native extensions.
[16:34:11][c.t.c.x.so:startoverui] [INFO] [execSync v1.0.2]
[16:34:11][c.t.c.x.so:startoverui] [INFO]     Native code compile failed!!
[16:34:12][c.t.c.x.so:startoverui] [INFO] 
[16:34:12][c.t.c.x.so:startoverui] [INFO] > node-sass@3.12.2 install /opt/teamcity-agent/work/ef08c3902e9a13fc/startoverui/lib/node_modules/angular-cli/node_modules/node-sass
[16:34:12][c.t.c.x.so:startoverui] [INFO] > node scripts/install.js
[16:34:12][c.t.c.x.so:startoverui] [INFO] 
[16:34:12][c.t.c.x.so:startoverui] [ERROR] info node-sass install Cached binary found at /opt/teamcity-agent/.npm/node-sass/3.12.2/linux-x64-46_binding.node
[16:34:14][c.t.c.x.so:startoverui] [INFO] 
[16:34:14][c.t.c.x.so:startoverui] [INFO] > node-sass@3.12.2 postinstall /opt/teamcity-agent/work/ef08c3902e9a13fc/startoverui/lib/node_modules/angular-cli/node_modules/node-sass
[16:34:14][c.t.c.x.so:startoverui] [INFO] > node scripts/build.js
[16:34:14][c.t.c.x.so:startoverui] [INFO] 
[16:34:14][c.t.c.x.so:startoverui] [ERROR] info node-sass build Binary found at /opt/teamcity-agent/work/ef08c3902e9a13fc/startoverui/lib/node_modules/angular-cli/node_modules/node-sass/vendor/linux-x64-46/binding.node
[16:34:14][c.t.c.x.so:startoverui] [ERROR] info node-sass build Testing binary
[16:34:14][c.t.c.x.so:startoverui] [ERROR] info node-sass build Binary is fine
[16:34:17][c.t.c.x.so:startoverui] [INFO] /opt/teamcity-agent/work/ef08c3902e9a13fc/startoverui/lib
[16:34:17][c.t.c.x.so:startoverui] [INFO] └─┬ angular-cli@1.0.0-beta.19-3 
[16:34:17][c.t.c.x.so:startoverui] [INFO]   ├─┬ @angular-cli/ast-tools@1.0.7 
[16:34:17][c.t.c.x.so:startoverui] [INFO]   │ └── rxjs@5.0.0-beta.11 
[16:34:17][c.t.c.x.so:startoverui] [INFO]   ├── @angular-cli/base-href-webpack@1.0.6 
[16:34:17][c.t.c.x.so:startoverui] [INFO]   ├── @angular/common@2.1.2 
[16:34:17][c.t.c.x.so:startoverui] [INFO]   ├── @angular/compiler@2.1.2 

etc. ...

[16:34:17][c.t.c.x.so:startoverui] [INFO] Running 'npm run-script prod --color=false' in /opt/teamcity-agent/work/ef08c3902e9a13fc/startoverui
[16:34:17][c.t.c.x.so:startoverui] [INFO] 
[16:34:17][c.t.c.x.so:startoverui] [INFO] > startoverui@0.0.1 prod /opt/teamcity-agent/work/ef08c3902e9a13fc/startoverui
[16:34:17][c.t.c.x.so:startoverui] [INFO] > ng build --prod --base-href /startoverui/ 
[16:34:17][c.t.c.x.so:startoverui] [INFO] 
[16:34:17][c.t.c.x.so:startoverui] [ERROR] sh: ng: command not found
[16:34:17][c.t.c.x.so:startoverui] [ERROR] 
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR! Linux 2.6.32-431.el6.x86_64
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR! argv "/opt/teamcity-agent/work/ef08c3902e9a13fc/startoverui/node/node" "/opt/teamcity-agent/work/ef08c3902e9a13fc/startoverui/node/node_modules/npm/bin/npm-cli.js" "run-script" "prod" "--color=false"
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR! node v4.5.0
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR! npm  v3.10.6
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR! file sh
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR! code ELIFECYCLE
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR! errno ENOENT
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR! syscall spawn
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR! startoverui@0.0.1 prod: `ng build --prod --base-href /startoverui/ `
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR! spawn ENOENT
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR! 
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR! Failed at the startoverui@0.0.1 prod script 'ng build --prod --base-href /startoverui/ '.
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR! Make sure you have the latest version of node.js and npm installed.
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR! If you do, this is most likely a problem with the startoverui package,
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR! not with npm itself.
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR! Tell the author that this fails on your system:
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR!     ng build --prod --base-href /startoverui/ 
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR! You can get information on how to open an issue for this project with:
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR!     npm bugs startoverui
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR! Or if that isn't available, you can get their info via:
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR!     npm owner ls startoverui
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR! There is likely additional logging output above.
[16:34:17][c.t.c.x.so:startoverui] [ERROR] 
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR! Please include the following file with any support request:
[16:34:17][c.t.c.x.so:startoverui] [ERROR] npm ERR!     /opt/teamcity-agent/work/ef08c3902e9a13fc/startoverui/npm-debug.log
[16:34:17][c.t.c.x.so:startoverui] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.26:npm (npm run-script prod) on project startoverui: Failed to run task
@eirslett

This comment has been minimized.

Owner

eirslett commented Nov 16, 2016

In package.json, instead of

    "scripts": {
    "start": "ng serve",

try

    "scripts": {
    "start": "./node_modules/.bin/ng serve",

or

    "scripts": {
    "start": "node node_modules/ng/bin/ng.js serve",

or some variation of that!

@vorgg

This comment has been minimized.

vorgg commented Nov 17, 2016

Thanks @eirslett! I had previously tried more explicit path definitions, but I hadn't been able to get it to work and your post convinced me to try it again and a bit differently. Also I didn't know you could call Angular-CLI (ng) via a Node call. That knowledge proved helpful as well.

I ultimately ended up with a script line in package.json of ...

"prod": "./node/node ./bin/ng build --prod --base-href /startoverui/"

... and that gets the job done. Thanks again!

@eirslett

This comment has been minimized.

Owner

eirslett commented Nov 18, 2016

I suggest you only use

"prod": "node ./bin/ng build --prod --base-href /startoverui/"

instead of

"prod": "./node/node ./bin/ng build --prod --base-href /startoverui/"

On a Windows machine, the binary is actually ./node/node.exe. But this plugin should handle PATH correctly, so that "node" will be the local node.js binary.

@fiLLLip

This comment has been minimized.

fiLLLip commented Dec 7, 2016

I have set up the following:

                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <configuration>
                    <workingDirectory>${frontend.path}</workingDirectory>
                    <installDirectory>${node.path}</installDirectory>
                    <nodeVersion>${node.version}</nodeVersion>
                    <npmVersion>${npm.version}</npmVersion>
                </configuration>
                <executions>
                    <execution>
                        <id>install node and npm</id>
                        <goals>
                            <goal>install-node-and-npm</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>npm install</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>install --production</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>angular-cli install</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>install --no-optional -g angular-cli</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>npm run-script mavenbuild</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>run-script mavenbuild</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>javascript tests</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <phase>test</phase>
                        <configuration>
                            <arguments>run-script maventest</arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

and in package.json

  "scripts": {
    "mavenbuild": "node ./node/node_modules/angular-cli/bin/ng build --prod --base-href /dev/",
    "maventest": "node ./node/node_modules/angular-cli/bin/ng test"
  },

This seems to work just fine, but my problem is that it is extremely slow (Windows 7). It takes ~9 minutes to build. Is this because I install angular-cli every time? I do not delete anything between builds.

I use mvn install -DskipTests=true -T8 to start the build.

@eirslett

This comment has been minimized.

Owner

eirslett commented Dec 7, 2016

My guess is that it's angular that is slow.

@legolas

This comment has been minimized.

legolas commented Dec 8, 2016

@fiLLLip I have a similar configuration:

<executions>
    <execution>
        <id>install node and npm</id>
        <goals>
            <goal>install-node-and-npm</goal>
        </goals>
        <phase>initialize</phase>
    </execution>
    <execution>
        <id>npm update</id>
        <phase>initialize</phase>
        <goals>
            <goal>npm</goal>
        </goals>
        <configuration>
            <arguments>update</arguments>
        </configuration>
    </execution>
    <execution>
        <id>npm build for production</id>
        <phase>compile</phase>
        <goals>
            <goal>npm</goal>
        </goals>
        <configuration>
            <arguments>run-script prod</arguments>
        </configuration>
    </execution>
</executions>

The first build takes quite some time, but after that it finishes preetty fast until I cleans the npm directory.
To me it seems the npm update step is slow in downloading/installing all the npm modules.

@digows

This comment has been minimized.

digows commented Feb 7, 2017

take a look at this:
https://github.com/eitsopensource/ngboot

It's working well.

@lberteau

This comment has been minimized.

lberteau commented Apr 7, 2017

@digows the link is dead.

@digows

This comment has been minimized.

digows commented Apr 7, 2017

@lberteau

This comment has been minimized.

lberteau commented Apr 7, 2017

@digows Thanks for the links, I will check them.

@the-pico

This comment has been minimized.

the-pico commented Jul 12, 2017

@eirslett
I'm trying to use angular-cli with node but i have this problem while installing it (im behind a proxy) :

[INFO] Running 'npm install --no-optional -g angular-cli --https-proxy=http://b35352:***@ncproxy1:80 --proxy=http://b35352:***@ncproxy1:80' in C:\Users\b35352\workspace lelouch\2.0-Lelouch\socle_raiser_whiteapps\whiteapp_horsportailatlas\app_whiteapp_horsportailatlas_web\src\main [ERROR] npm http GET https://registry.npmjs.org/angular-cli [ERROR] npm ERR! TypeError: Request path contains unescaped characters [ERROR] npm ERR! at new ClientRequest (_http_client.js:125:13) [ERROR] npm ERR! at TunnelingAgent.request (http.js:39:10) [ERROR] npm ERR! at TunnelingAgent.createSocket (C:\Users\b35352\workspace lelouch\2.0-Lelouch\socle_raiser_whiteapps\whiteapp_horsportailatlas\app_whiteapp_horsportailatlas_web\target\node\node_modules\npm\node_modules\request\node_modules\tunnel-agent\index.js:117:25) [ERROR] npm ERR! at TunnelingAgent.createSecureSocket [as createSocket] (C:\Users\b35352\workspace lelouch\2.0-Lelouch\socle_raiser_whiteapps\whiteapp_horsportailatlas\app_whiteapp_horsportailatlas_web\target\node\node_modules\npm\node_modules\request\node_modules\tunnel-agent\index.js:184:41) [ERROR] npm ERR! at TunnelingAgent.addRequest (C:\Users\b35352\workspace lelouch\2.0-Lelouch\socle_raiser_whiteapps\whiteapp_horsportailatlas\app_whiteapp_horsportailatlas_web\target\node\node_modules\npm\node_modules\request\node_modules\tunnel-agent\index.js:80:8) [ERROR] npm ERR! at new ClientRequest (_http_client.js:272:16) [ERROR] npm ERR! at Object.request (http.js:39:10) [ERROR] npm ERR! at Object.request (https.js:233:15) [ERROR] npm ERR! at Request.start (C:\Users\b35352\workspace lelouch\2.0-Lelouch\socle_raiser_whiteapps\whiteapp_horsportailatlas\app_whiteapp_horsportailatlas_web\target\node\node_modules\npm\node_modules\request\request.js:583:30) [ERROR] npm ERR! at Request.end (C:\Users\b35352\workspace lelouch\2.0-Lelouch\socle_raiser_whiteapps\whiteapp_horsportailatlas\app_whiteapp_horsportailatlas_web\target\node\node_modules\npm\node_modules\request\request.js:1237:28) [ERROR] npm ERR! If you need help, you may report this *entire* log, [ERROR] npm ERR! including the npm and node versions, at: [ERROR] npm ERR! <http://github.com/npm/npm/issues> [ERROR] [ERROR] npm ERR! System Windows_NT 6.1.7601 [ERROR] npm ERR! command "C:\\Users\\b35352\\workspace lelouch\\2.0-Lelouch\\socle_raiser_whiteapps\\whiteapp_horsportailatlas\\app_whiteapp_horsportailatlas_web\\target\\node\\node.exe" "C:\\Users\\b35352\\workspace lelouch\\2.0-Lelouch\\socle_raiser_whiteapps\\whiteapp_horsportailatlas\\app_whiteapp_horsportailatlas_web\\target\\node\\node_modules\\npm\\bin\\npm-cli.js" "install" "--no-optional" "-g" "angular-cli" "--https-proxy=http://b35352:b35352.BO7412@ncproxy1:80" "--proxy=http://b35352:b35352.BO7412@ncproxy1:80" [ERROR] npm ERR! cwd C:\Users\b35352\workspace lelouch\2.0-Lelouch\socle_raiser_whiteapps\whiteapp_horsportailatlas\app_whiteapp_horsportailatlas_web\src\main [ERROR] npm ERR! node -v v8.1.4 [ERROR] npm ERR! npm -v 1.4.9 [ERROR] npm ERR! [ERROR] npm ERR! Additional logging details can be found in: [ERROR] npm ERR! C:\Users\b35352\workspace lelouch\2.0-Lelouch\socle_raiser_whiteapps\whiteapp_horsportailatlas\app_whiteapp_horsportailatlas_web\src\main\npm-debug.log [ERROR] npm ERR! not ok code 0

ps: i tried the command line manually but it didnt work, i think the proxy-config must be before install command.

@dhoffer

This comment has been minimized.

dhoffer commented Feb 2, 2018

I am following the example posted by digows. This works great on Linux but fails on Windows. How do I make this cross-platform? We need to support both. I will post my pom and package.json script below. I'm a Java dev not JS so don't have any experience with the JS config/builds.

<properties>
    <node.version>v7.5.0</node.version>
    <npm.version>4.1.2</npm.version>
    <node.path>${user.home}/.node</node.path>
    <typescript.path>./</typescript.path>
</properties>
<plugin>
        <groupId>com.github.eirslett</groupId>
        <artifactId>frontend-maven-plugin</artifactId>
        <version>1.3</version>
        <configuration>
          <nodeVersion>${node.version}</nodeVersion>
          <npmVersion>${npm.version}</npmVersion>
          <workingDirectory>${typescript.path}</workingDirectory>
          <installDirectory>${node.path}</installDirectory>
        </configuration>
        <executions>
          <execution>
            <id>install node and npm</id>
            <phase>initialize</phase>
            <goals>
              <goal>install-node-and-npm</goal>
            </goals>
          </execution>
          <execution>
            <id>npm install</id>
            <phase>initialize</phase>
            <goals>
              <goal>npm</goal>
            </goals>
            <configuration>
              <arguments>install --no-optional</arguments>
            </configuration>
          </execution>
          <execution>
            <id>npm run-script mavenbuild</id>
            <phase>compile</phase>
            <goals>
              <goal>npm</goal>
            </goals>
            <configuration>
              <arguments>run-script mavenbuild</arguments>
            </configuration>
          </execution>
        </executions>
</plugin>

"scripts": {
"ng": "ng",
"start": "ng serve",
"mavenbuild": "node node_modules/.bin/ng build -op target/dist",
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},

The error I get on Windows is:
[INFO] > node node_modules/.bin/ng build -op target/dist
[INFO]
[ERROR] C:\git\ODIN\tip-and-cue-refactor\odin-web-ui\node_modules.bin\ng:2
[ERROR] basedir=$(dirname "$(echo "$0" | sed -e 's,\,/,g')")
[ERROR] ^^^^^^^
[ERROR] SyntaxError: missing ) after argument list
[ERROR] at Object.exports.runInThisContext (vm.js:73:16)
[ERROR] at Module._compile (module.js:543:28)
[ERROR] at Object.Module._extensions..js (module.js:580:10)
[ERROR] at Module.load (module.js:488:32)
[ERROR] at tryModuleLoad (module.js:447:12)
[ERROR] at Function.Module._load (module.js:439:3)
[ERROR] at Module.runMain (module.js:605:10)
[ERROR] at run (bootstrap_node.js:418:7)
[ERROR] at startup (bootstrap_node.js:139:9)
[ERROR] at bootstrap_node.js:533:3
[ERROR]
[ERROR] npm ERR! Windows_NT 6.1.7601
[ERROR] npm ERR! argv "C:\Users\david.hoffer\.node\node\node.exe" "C:\Users\david.hoffer\.node\node\node_modules\npm\bin\npm-cli.js" "run-script" "mavenbuild"
[ERROR] npm ERR! node v7.5.0
[ERROR] npm ERR! npm v4.1.2
[ERROR] npm ERR! code ELIFECYCLE
[ERROR] npm ERR! odin-web-ui@0.0.0 mavenbuild: node node_modules/.bin/ng build -op target/dist
[ERROR] npm ERR! Exit status 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment