PatrickJS-starter icon indicating copy to clipboard operation
PatrickJS-starter copied to clipboard

fix:ng fails on Windows

Open TomGillen opened this issue 10 years ago • 7 comments

In one of the scripts in package.json:

rimraf node_modules/angular2/manual_typings node_modules/angular2/typings node_modules/angular2/bundles/typings && cp -R src/.ng2-patch/. node_modules/angular2

This does not work; "cp" is not a recognized command on Windows.

TomGillen avatar Jan 26 '16 17:01 TomGillen

On further testing, if I replace the cp with a similar xcopy command, everything installs fine, but while running I get errors complaining about "__decorate" not being recognized in template_compiler.js:205 and the page fails to load properly.

Removing the copy entirely, and running with the original template_compiler, the example seems to load fine.

TomGillen avatar Jan 26 '16 17:01 TomGillen

That "__decorate" thing is fixed #257.

Snejk47 avatar Jan 26 '16 17:01 Snejk47

I pushed an update to fix this https://github.com/AngularClass/angular2-webpack-starter/commit/ac7d641d28946d41d9771e9705c45e23c905a929 please run

npm run clean:install

PatrickJS avatar Jan 26 '16 18:01 PatrickJS

I just did a clean copy of the project and ran npm install:

> rimraf node_modules/angular2/manual_typings node_modules/angular2/typings node_modules/angular2/bundles/typings && ncp
 src/.ng2-patch node_modules && replace '"rxjs": "5.0.0-beta.0"' '"rxjs": "5.0.0-beta.1"' node_modules/* -r

fs.js:887
  return binding.lstat(pathModule._makeLong(path));
                 ^

Error: ENOENT: no such file or directory, lstat 'D:\Projects\angular2-webpack-starter-master\'rxjs:'

TomGillen avatar Jan 26 '16 19:01 TomGillen

@TomGillen I pushed another update if you can give it another try

PatrickJS avatar Jan 26 '16 20:01 PatrickJS

Yup, working now.

TomGillen avatar Jan 26 '16 23:01 TomGillen

thanks again for for making the issue and commenting again :+1:

PatrickJS avatar Jan 27 '16 00:01 PatrickJS