aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
256 stars 124 forks source link

npm package restore fails for @reactivex/rxjs #299

Open spboyer opened 8 years ago

spboyer commented 8 years ago

When opening a project that has the npm package @reactivex/rxjs or an npm package with that dependency is fails when doing right click -> restore dependencies.

====Executing command 'npm install'====

npm WARN package.json CleanShave@0.0.0 No repository field.
npm http GET https://registry.npmjs.org/angular2-universal-preview
npm http GET https://registry.npmjs.org/angular2
npm http 304 https://registry.npmjs.org/angular2-universal-preview
npm http 304 https://registry.npmjs.org/angular2
npm http GET https://registry.npmjs.org/css
npm http GET https://registry.npmjs.org/parse5
npm http GET https://registry.npmjs.org/preboot
npm http GET https://registry.npmjs.org/xhr2
npm http GET https://registry.npmjs.org/es6-shim
npm http GET https://registry.npmjs.org/zone.js
npm http GET https://registry.npmjs.org/reactivex/rxjs
npm http 304 https://registry.npmjs.org/css
npm http 304 https://registry.npmjs.org/es6-shim
npm http 304 https://registry.npmjs.org/zone.js
npm http 304 https://registry.npmjs.org/parse5
npm http 304 https://registry.npmjs.org/xhr2
npm http 404 https://registry.npmjs.org/reactivex/rxjs
npm http 304 https://registry.npmjs.org/preboot
npm ERR! 404 Not Found
npm ERR! 404 
npm ERR! 404 'reactivex/rxjs' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 It was specified as a dependency of 'angular2-universal-preview'
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\Extensions\\Microsoft\\Web Tools\\External\\\\node\\node" "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\Extensions\\Microsoft\\Web Tools\\External\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Github\cleanshave
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.9
npm ERR! code E404
npm http GET https://registry.npmjs.org/zone.js
npm http GET https://registry.npmjs.org/reactivex/rxjs
npm http 304 https://registry.npmjs.org/zone.js
npm http 404 https://registry.npmjs.org/reactivex/rxjs
npm

====npm command completed with exit code 1====

However when using cmd line npm restore package(s) restore appropriately.

npm WARN package.json CleanShave@0.0.0 No repository field.
npm WARN peerDependencies The peer dependency css@^2.2.1 included from angular2-universal-preview will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency parse5@^1.5.0 included from angular2-universal-preview will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN engine @reactivex/rxjs@5.0.0-alpha.4: wanted: {"npm":"~2.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine @reactivex/rxjs@5.0.0-alpha.4: wanted: {"npm":"~2.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
parse5@1.5.0 node_modules\parse5

css@2.2.1 node_modules\css
├── urix@0.1.0
├── inherits@2.0.1
├── source-map-resolve@0.3.1 (atob@1.1.2, resolve-url@0.2.1, source-map-url@0.3.0)
└── source-map@0.1.43 (amdefine@1.0.0)

angular2-universal-preview@0.6.1 node_modules\angular2-universal-preview
├── xhr2@0.1.3
├── es6-shim@0.33.13
├── parse5@1.5.0
├── css@2.2.1 (inherits@2.0.1, urix@0.1.0, source-map@0.1.43, source-map-resolve@0.3.1)
├── zone.js@0.5.8 (es6-promise@3.0.2)
├── preboot@1.0.2 (gulp-rename@1.2.2, q@1.4.1, vinyl-source-stream@1.1.0, vinyl-buffer@1.0.0, gulp-insert@0.5.0, gulp-uglify@1.5.1, browserify@11.2.0)

└── @reactivex/rxjs@5.0.0-alpha.4

angular2@2.0.0-alpha.45 node_modules\angular2
├── zone.js@0.5.8 (es6-promise@3.0.2)
└── @reactivex/rxjs@5.0.0-alpha.4

Here is the package.json file

{
  "name": "CleanShave",
  "version": "0.0.0",
  "dependencies": {
    "angular2": "2.0.0-alpha.45",
    "angular2-universal-preview": "^0.6.1",
    "bootstrap": "^3.3.5",
    "jquery": "^2.1.4",
    "less": "^2.5.3",
    "lodash": "^3.10.1",
    "reflect-metadata": "^0.1.2",
    "systemjs": "^0.19.3"
  },
  "devDependencies": {
    "del": "^2.0.2",
    "event-stream": "^3.3.1",
    "gulp": "^3.9.0",
    "gulp-inline-ng2-template": "0.0.7",
    "gulp-sourcemaps": "^1.6.0",
    "gulp-typescript": "^2.9.0",
    "typescript": "^1.6.2"
   }
}

@madskristensen

sayedihashimi commented 8 years ago

TFS: 168825 I've added this to our internal TFS, we will reply back here soon.

alvipeo commented 8 years ago

Same here.

jodavis commented 8 years ago

Thanks for reporting this issue. The next version of the Web Tools for VS will include newer versions of Node.js and npm, which seems to handle this syntax better. By default, current versions of the Web Tools are using a very old version of npm which does not appear to handle this syntax.

Since it sounds like you have a newer version of npm installed already, you can tell VS to use that version instead, by going to Tools->Options->Projects and Solutions->External Web Tools, and moving the $(PATH) value above the VS install locations in the list.

ChuckkNorris commented 8 years ago

Found this on a blog which allows you to target your installed version of NodeJS: While Node.js and its corresponding package manager, namely “npm” are part of the install for Visual Studio 2015 – it installs with 1.4.9 which is unfortunately an outdated version. Angular2 might play nicer with a later version of npm. “Node.js” package ecosystem, npm, is the largest ecosystem of open source libraries in the world! Let’s address this now, so that we do not run into issues once we start writing code. Install the latest version of Node.js here. Once installed navigate to the following directory:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\

Open the npm.cmd file in your favorite text editor (running as Administrator) and replace the contents of this file with the following:

@”C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” %*

Now Visual Studio 2015 will utilize the npm version that was installed from the aforementioned steps.

tahaipek commented 8 years ago

@ChuckkNorris Thanks for response.

webtools-bot commented 7 years ago

The GitHub Issue Tracker for the aspnet/Tooling repo is being deprecated in favor of Visual Studio's Report a Problem tool.

If this issue is still a problem with the RTW release of Visual Studio 2017, please report a new issue using the Report a Problem tool. While you can still use .NET Core and ASP.NET Preview tools with Visual Studio 2015, Visual Studio 2017 is now the officially supported tool for developing .NET Core and ASP.NET Core projects.

By using the Report a Problem tool (available in both VS 2017 and VS 2015), you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks. See Visual Studio's Talk to Us page for more details.

Please use the discussion topic here for feedback and questions on the deprecation of this issue tracker. Thanks!