Node Modules not publishing for Visual studio code extension - visual-studio

I have developed an extension for Visual Studio Code.
Its working fine on my computer.
"devDependencies": {
"fs": "^0.0.2",
"github": "^0.2.4",
"node-github": "0.0.3",
"open": "^0.0.5",
"typescript": "^1.6.2",
"vscode": "0.10.x"
},
"dependencies": {
"fs": "^0.0.2",
"github": "^0.2.4",
"node-github": "0.0.3",
"open": "^0.0.5",
"typescript": "^1.6.2",
"vscode": "0.10.x"
}
The problem is when I publish the extension online and download it. I don't get those npm modules in my computer causing my extension to crash.
How can I add those modules while publish?. If there is no possibility then how do I read a file and post it on github without npm modules in a visual studio code extension.

I would suggest looking at some of the extensions in the gallery https://marketplace.visualstudio.com/#VSCode. Specifically, the "Get Started" on the right usually points to a GitHub repo where you look at how other people have solved this issue.
I didn't use any dependencies like that in my extension, but here's the first one that looked similar to what you want: https://github.com/ziyasal/vscode-open-in-github/blob/master/package.json

I had to change it to.
"devDependencies": {
"typescript": "^1.6.2",
"vscode": "0.10.x"
},
"dependencies": {
"fs": "^0.0.2",
"github": "^0.2.4",
"node-github": "0.0.3",
"open": "^0.0.5"
}
then run npm install and then vsce package then it will added into that extension file.

Related

bower install does not create folder with packages even though it is set up with .bowerrc (Mac)

I am trying to set up an existing UI project on my mac machine using npm & bower. The project has proper bower.json and .bowerrc files. I run npm install followed by bower install. The expectation is that all the necessary bower packages will end up being created in the specified by .bowerrc directory. The bower install command seems to be executed with no errors, but the packages' folder is NOT created.
The contents of .bowerrc file:
{
"directory": "libraries",
"resolvers": [ "bower-npm-resolver" ]
}
The contents of bower.json file:
{
"name": "ui-project",
"version": "0.1.0",
"license": "All rights reserved.",
"dependencies": {
"angular": "~1.7.x",
"angular-mocks": "~1.7.x",
"angular-translate": "~2.17.x",
"angular-translate-loader-static-files": "~2.17.x",
"angular-animate": "~1.7.x",
"angular-dynamic-locale": "~0.1.x",
"angular-ui-router": "0.4.2",
"angular-moment": "~1.1.0",
"angular-i18n": "~1.7.x",
"angular-ui-utils": "~0.1.1",
"angular-messages": "~1.7.x",
"angular-sanitize": "~1.7.x",
"angular-uuids": "~0.0.4",
"angular-cookies": "1.7.x",
"animate.css": "~3.2.x",
"restangular": "~1.5.0",
"ngstorage": "~0.3.x",
"moment": "~2.10.x",
"ng-file-upload": "~2.2.x",
"lodash": "~4.13.1",
"file-saver": "1.3.3",
"highcharts-release": "~4.1.x",
"highcharts-pattern-fill": "https://github.com/highcharts/pattern-fill.git#3.0.2",
"ng-focus-on": "~0.2.x",
"ngSmoothScroll": "~2.0.0",
"Sortable": "https://github.com/RubaXa/Sortable.git#6952f3b525702e0daa9033b06e7e43e3a5c24692",
"angulartics": "~1.6.0",
"js-sha256": "~0.3.0",
"angular-datepicker": "~2.0.3",
"validator-js": "~8.2.0",
"ip-address": "~5.8.8",
"papaparse": "~4.3.7",
"angulartics-piwik": "~1.0.6",
"fusion-header": "npm:#muteam/fusion-header#2.1.53-light",
"single-spa": "npm:single-spa#5.5.3",
"single-spa-angularjs": "npm:single-spa-angularjs#3.3.0",
"import-map-overrides": "npm:import-map-overrides#1.15.2",
"zone.js": "npm:zone.js#0.10.3",
"systemjs": "npm:systemjs#6.3.2"
},
"resolutions": {
"angular": "~1.7.x"
}
}
The contents of package.json:
{
"name": "ui-project",
"version": "1.0.2361",
"copyright": "All rights reserved.",
"repository": {
"type": "git",
"url": "git#stash.muteam.com/ui-project.git"
},
"engines": {
"node": ">=4.4.0"
},
"scripts": {
"postinstall": "bower install",
"postversion": "git add ./bower-lock.json && git commit --amend --no-edit",
"test": "grunt test",
"build": "grunt build",
"grunt": "grunt",
"grunt:dev": "grunt dev"
},
"devDependencies": {
"bower": "~1.8.8",
"bower-npm-resolver": "^0.10.0",
"chance": "^1.1.4",
"connect-modrewrite": "^0.10.2",
"my-custom-common-components": "^0.0.47",
"grunt": "~0.4.5",
"grunt-autoprefixer": "~1.0.1",
"grunt-bower-task": "~0.4.0",
"grunt-cli": "~1.2.0",
"grunt-concurrent": "~2.3.0",
"grunt-contrib-clean": "~1.0.0",
"grunt-contrib-concat": "~1.0.1",
"grunt-contrib-connect": "~1.0.2",
"grunt-contrib-copy": "~1.0.0",
"grunt-contrib-jshint": "~2.0.0",
"grunt-contrib-less": "~1.3.0",
"grunt-contrib-uglify": "~2.0.0",
"grunt-contrib-watch": "^1.1.0",
"grunt-exec": "^2.0.0",
"grunt-git-describe": "~2.3.2",
"grunt-html2js": "~0.3.6",
"grunt-jsonlint": "~1.1.0",
"grunt-karma": "~3.0.2",
"grunt-less2js": "~0.1.5",
"grunt-ng-annotate": "^2.0.2",
"grunt-ng-constant": "~2.0.2",
"grunt-ngdocs": "~0.2.11",
"grunt-string-replace": "~1.2.1",
"grunt-webfont": "~1.4.0",
"jasmine-core": "~3.5.0",
"js-beautify": "1.6.14",
"jshint-path-reporter": "~0.1.3",
"karma": "~4.4.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage": "^1.1.2",
"karma-firefox-launcher": "~1.0.0",
"karma-jasmine": "^3.1.1",
"karma-jasmine-diff-reporter": "^0.6.2",
"karma-junit-reporter": "~1.1.0",
"karma-ng-html2js-preprocessor": "~1.0.0",
"less": "~1.7.3",
"load-grunt-tasks": "~3.5.0",
"lodash": "~4.13.1",
"time-grunt": "~1.4.0"
},
"dependencies": {
"my-custom-framework": "^1.0.37"
}
}
What could be wrong? Something with the user privileges?
What is in your package.json and bower.json?
The syntax for directory looks right to me as far as comparing to another project of mine. Are you getting any errors after installation?
You might get more details if you try and bower install --verbose
Finally fixed the issue. In my case, uninstalling brew's latest node 14 and installing node 12 from scratch through the regular installer helped.

how to install kendo ui on visual studio 2015

anyone knows how do i install kendo-ui ng2 on vs 2015 ?
should i use the packege.json flle ?
{
"version": "0.0.0",
"name": "Angular2AspNetCoreDemo",
"dependencies": {
"angular2": "2.0.0-beta.8",
"systemjs": "0.19.22",
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.2",
"zone.js": "0.5.15",
"bootstrap": "^3.3.5",
"jquery": "^2.1.4"
},
"devDependencies": {
"gulp": "^3.9.1"
}
}
Everything you need to know is decribed here:
http://www.telerik.com/kendo-angular-ui/getting-started/#installation
You can use the inbuilt npm support of VS

Bower does not download dist folder

I am using Visual Studio 2015 and creating a test MVC application.
I have added bower file (bower.json) with code as follows:
{
"name": "asp.net",
"private": true,
"dependencies": {
"jquery": "2.2.3",
"jquery-validation":"1.15.1",
"jquery-validation-unobtrusive": "3.2.5"
},
"resolutions": {
"jquery-validation": ">=1.8"
}
}
When I save the bower.json, it downloads all correctly, but for jquery-validation it does not download the dist folder:

node sass release 3.5.3 is breaking build

This is also currently biting my project, which uses gulp-sass. gulp-sass depends on node-sass#^3.4.1 which just automatically updated to 3.5.3 which is a breaking release.
I have degraded my gulp sass version to the older(2.1.0) by updating the
package.json file but its still breaking.
how to go back to node sass 3.4.2?
Error Message
Error: You may not #extend an outer selector from within #media.
You may only #extend selectors within the same directive.
{
"version": "1.0.0",
"name": "abcd",
"devDependencies": {
"bower": "^1.3.12",
"express": "^4.12.3",
"gulp": "^3.8.10",
"gulp-autoprefixer": "^2.1.0",
"gulp-bower": "^0.0.7",
"gulp-concat": "^2.5.2",
"gulp-install": "^0.4.0",
"gulp-livereload": "^3.8.0",
"gulp-minify-css": "^1.0.0",
"gulp-plumber": "^1.0.0",
"gulp-sass": "2.1.0",
"gulp-sourcemaps": "^1.5.1",
"gulp-uglify": "^1.1.0"
},
"dependencies": {
"jquery": "1.11.1"
}
}
Looks like a new version was just released that allows the "buggy" version of node-sass but you can always npm shrinkwrap specific sub-dependencies to a specific version if you need to - assuming that the primary package is compatible with that dependency version.
This will lock the node-sass version in gulp-sass to 3.4.2:
{
"name": "yourprojectname",
"version": "1.0.0",
"dependencies": {
"gulp-sass": {
"version": "2.3.1",
"from": "gulp-sass#>=2.3.1 <3.0.0",
"resolved": "https://registry.npmjs.org/gulp-sass/-/gulp-sass-2.3.1.tgz",
"dependencies": {
"node-sass": {
"version": "3.4.2"
}
}
}
}
}
Make sure you delete your node_modules npm cache clean to clear your locally cached packages before running npm install again.

React-art for bower in Visual Studio 2015

I can't get react-art in bower.json in Visual Studio 2015. However, I can get it in package.json.
Package.json:
As a result, I don't see React-art in the wwwroot\lib folder and the react-art not working.
{
"name": "ASP.NET",
"version": "0.0.0",
"devDependencies": {
"gulp": "3.8.11",
"gulp-concat": "2.5.2",
"gulp-cssmin": "0.1.7",
"gulp-uglify": "1.2.0",
"rimraf": "2.2.8",
"react": "0.13.3",
"react-art": "0.13.0"
}
}
bower.json
The reason you've got it package.json is because you've installed a npm package of react-art, not a bower one (which isn't available). But if you're using Browserify, you'll be to use it with the following command
var reactArt = require('react-art');

Resources