-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
Remove NPM as a dependency, use the NPM installed on users' machine #1845
Comments
By @enchev: Can you post here more info why we have our own nmp and why we do not use the instilled one. What problems we solved? Thanks |
By @rosen-vladimirov: How does npm workNativeScript projects rely on npm and npm's structure. This means that each project has package.json with dependencies and devDependencies. When you call How does NativeScript CLI handle dependenciesDue to known behavior of NativeScript's require, all dependencies used in a project must be flattened when copied to The problemWhen npm 3.x.x is installed and user executes The workaroundNativeScript CLI has Why npm as dependencyIn case we rely on user's npm version we have to:
|
by @hdeshev: Dragging our own pinned version of npm is a workaround that seems to work for many cases, but it's nothing more than a workaround. I believe we have to get rid of it -- the breakage caused by a command such as I'm probably oversimplifying everything, but can we rely on the user running |
Please excuse me, but relying on a specific version of a library is not a workaround for me. In the same manner we can drop all of our dependencies and ask the users to install them globally. I agree that Also we cannot rely on user's calling of
That's why CLI calls |
I am fine having a dependency to npm for the pure reason of not having to execute a side process. However, having a strict dependency makes us lazy. The CLI does not evolve with the rest of the framework because we do not dedicate enough resources on keeping it modern by updating its dependencies. This is especially valid for complex dependencies such as npm, which is a giant tool by itself. While it is possible that the teams specify a recurring task for updating the dependencies, I think it would be better that the necessity of an update come naturally. Thus, I vote that we call the npm instance that is installed on customer machine. I'd add additional verification via builds (Travis-CI?) that will produce a list of npm/nodejs versions NativeScript CLI works with properly. |
The point I tried to make with my previous post is that we have no choice but to support the scenario where the end user runs an So, here we are having to support npm 2 and npm 3 anyway (since we don't want to force users into using a specific version of npm). Why bundle npm 2 then? I'm afraid it could mask issues that would normally be discovered earlier during internal testing. |
I am copying here the discussion from #1740, for it deserves a separate thread...
The text was updated successfully, but these errors were encountered: