How to avoid adding the dependencies to config.js when installing JSPM plugins? - jspm

When I install the css plugin, using the following command:
jspm install css
The following is added to my config.js:
System.config({
"map": {
"css": "github:systemjs/plugin-css#0.1.6",
"github:jspm/nodelibs-assert#0.1.0": {
"assert": "npm:assert#1.3.0"
},
"github:jspm/nodelibs-buffer#0.1.0": {
"buffer": "npm:buffer#3.0.3"
},
"github:jspm/nodelibs-events#0.1.0": {
"events-browserify": "npm:events-browserify#0.0.1"
},
"github:jspm/nodelibs-http#1.7.0": {
"Base64": "npm:Base64#0.2.1",
"events": "github:jspm/nodelibs-events#0.1.0",
"inherits": "npm:inherits#2.0.1",
"stream": "github:jspm/nodelibs-stream#0.1.0",
"url": "github:jspm/nodelibs-url#0.1.0",
"util": "github:jspm/nodelibs-util#0.1.0"
},
"github:jspm/nodelibs-https#0.1.0": {
"https-browserify": "npm:https-browserify#0.0.0"
},
"github:jspm/nodelibs-os#0.1.0": {
"os-browserify": "npm:os-browserify#0.1.2"
},
"github:jspm/nodelibs-path#0.1.0": {
"path-browserify": "npm:path-browserify#0.0.0"
},
"github:jspm/nodelibs-process#0.1.1": {
"process": "npm:process#0.10.1"
},
"github:jspm/nodelibs-stream#0.1.0": {
"stream-browserify": "npm:stream-browserify#1.0.0"
},
"github:jspm/nodelibs-url#0.1.0": {
"url": "npm:url#0.10.3"
},
"github:jspm/nodelibs-util#0.1.0": {
"util": "npm:util#0.10.3"
},
"github:systemjs/plugin-css#0.1.6": {
"clean-css": "npm:clean-css#3.0.10",
"fs": "github:jspm/nodelibs-fs#0.1.1",
"path": "github:jspm/nodelibs-path#0.1.0"
},
"npm:amdefine#0.1.0": {
"fs": "github:jspm/nodelibs-fs#0.1.1",
"module": "github:jspm/nodelibs-module#0.1.0",
"path": "github:jspm/nodelibs-path#0.1.0",
"process": "github:jspm/nodelibs-process#0.1.1"
},
"npm:assert#1.3.0": {
"util": "npm:util#0.10.3"
},
"npm:buffer#3.0.3": {
"base64-js": "npm:base64-js#0.0.8",
"ieee754": "npm:ieee754#1.1.4",
"is-array": "npm:is-array#1.0.1"
},
"npm:clean-css#3.0.10": {
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"commander": "npm:commander#2.5.1",
"fs": "github:jspm/nodelibs-fs#0.1.1",
"http": "github:jspm/nodelibs-http#1.7.0",
"https": "github:jspm/nodelibs-https#0.1.0",
"os": "github:jspm/nodelibs-os#0.1.0",
"path": "github:jspm/nodelibs-path#0.1.0",
"process": "github:jspm/nodelibs-process#0.1.1",
"source-map": "npm:source-map#0.1.43",
"url": "github:jspm/nodelibs-url#0.1.0",
"util": "github:jspm/nodelibs-util#0.1.0"
},
"npm:commander#2.5.1": {
"child_process": "github:jspm/nodelibs-child_process#0.1.0",
"events": "github:jspm/nodelibs-events#0.1.0",
"path": "github:jspm/nodelibs-path#0.1.0",
"process": "github:jspm/nodelibs-process#0.1.1"
},
"npm:core-util-is#1.0.1": {
"buffer": "github:jspm/nodelibs-buffer#0.1.0"
},
"npm:events-browserify#0.0.1": {
"process": "github:jspm/nodelibs-process#0.1.1"
},
"npm:https-browserify#0.0.0": {
"http": "github:jspm/nodelibs-http#1.7.0"
},
"npm:inherits#2.0.1": {
"util": "github:jspm/nodelibs-util#0.1.0"
},
"npm:os-browserify#0.1.2": {
"os": "github:jspm/nodelibs-os#0.1.0"
},
"npm:path-browserify#0.0.0": {
"process": "github:jspm/nodelibs-process#0.1.1"
},
"npm:punycode#1.3.2": {
"process": "github:jspm/nodelibs-process#0.1.1"
},
"npm:readable-stream#1.1.13": {
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"core-util-is": "npm:core-util-is#1.0.1",
"events": "github:jspm/nodelibs-events#0.1.0",
"inherits": "npm:inherits#2.0.1",
"isarray": "npm:isarray#0.0.1",
"process": "github:jspm/nodelibs-process#0.1.1",
"stream": "npm:stream-browserify#1.0.0",
"string_decoder": "npm:string_decoder#0.10.31",
"util": "github:jspm/nodelibs-util#0.1.0"
},
"npm:source-map#0.1.43": {
"amdefine": "npm:amdefine#0.1.0",
"fs": "github:jspm/nodelibs-fs#0.1.1",
"path": "github:jspm/nodelibs-path#0.1.0",
"process": "github:jspm/nodelibs-process#0.1.1"
},
"npm:stream-browserify#1.0.0": {
"events": "github:jspm/nodelibs-events#0.1.0",
"inherits": "npm:inherits#2.0.1",
"readable-stream": "npm:readable-stream#1.1.13"
},
"npm:string_decoder#0.10.31": {
"buffer": "github:jspm/nodelibs-buffer#0.1.0"
},
"npm:url#0.10.3": {
"assert": "github:jspm/nodelibs-assert#0.1.0",
"punycode": "npm:punycode#1.3.2",
"querystring": "npm:querystring#0.2.0",
"util": "github:jspm/nodelibs-util#0.1.0"
},
"npm:util#0.10.3": {
"inherits": "npm:inherits#2.0.1",
"process": "github:jspm/nodelibs-process#0.1.1"
}
}
});
How can I keep my config.js tidy in order to avoid including all this all this info in all my pages (since config.js needs to be included in every page)?

I'm new to JSPM too and had a similar reaction about the large config.js sizes, but here's a few things I've learned:
1) I wouldn't use JSPM for Node modules that you only want to use on the server side / development machine. You can just continue to use NPM for those. I made this mistake - thinking that I should use JSPM for all dependencies, replacing both Bower and NPM. I installed gulp through JSPM and my config.js was suddenly over 700 lines long!
2) I wondered if it was possible to configure it to just record the top-level dependencies - like in package.json - not all the dependencies of dependencies... It doesn't sound like it. I asked in the Gitter group and the response was: "Big as it is, it gives you control over peer dependencies that you don't have in npm". (Thanks Mitranim).
3) If you're familiar with require.js, you can think of your config.js as being a bit like your require.config(...). One of the things it does is set up your short names you can use to include your modules with. As a former require.js user, I accepted that I needed to include my require.js config file on the front-end as the entry point, and its the same for config.js - at least, for development...
4) Production is another matter. Quoting Guy Bedford on the Gitter group: "the config file isn't meant to be included in production \ workflows around that will develop". There's more info in the "Bundle for production" section in the Getting Started guide.
5) I found a useful starting point is Jack Franklin's demo from Async Brighton. Particularly of note: he has a bundle workflow for production which switches the script includes to just point to the minified app.min.js - see the Makefile.

Related

eslint-plugin-testing-library is not catching lint errors

I'm trying to add eslint-plugin-testing library to a project to catch common errors in our #testing-library/react tests. I've followed the instruction steps, yet I cannot get it to catch errors in the test files.
For example, I manually turn on the no-debug rule, add a debug() statement in a .test.tsx file, and run the linter. It does not catch any mistakes in the file.
If I break rules from other plugins, they are caught, so I suspect I may have something wrong in how I added the testing-library plugin to my config.
package.json
{
"dependencies": {
"react": "16.12.0",
"react-dom": "16.12.0"
},
"devDependencies": {
"#babel/core": "7.7.0",
"#babel/preset-react": "7.0.0",
"#babel/preset-typescript": "7.1.0",
"#testing-library/react": "9.1.3",
"#typescript-eslint/eslint-plugin": "2.15.0",
"#typescript-eslint/parser": "2.15.0",
"eslint": "6.8.0",
"eslint-plugin-cypress": "2.10.3",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-react": "7.19.0",
"eslint-plugin-react-hooks": "2.3.0",
"eslint-plugin-testing-library": "3.0.0",
"typescript": "3.7.3"
}
}
.eslintrc
{
"parser": "#typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"modules": true
}
},
"env": {
"browser": true,
"es6": true,
"jasmine": true,
"jest": true,
"jquery": true,
"node": true
},
"plugins": [
"#typescript-eslint",
"jsx-a11y",
"react-hooks",
"react",
"testing-library"
],
"extends": [
"eslint:recommended",
"plugin:jsx-a11y/recommended",
"plugin:react/recommended",
"plugin:testing-library/recommended"
],
"rules": {
"#typescript-eslint/no-unused-vars-experimental": "off",
"no-unused-vars": "off",
"react-hooks/exhaustive-deps": "warn",
"react-hooks/rules-of-hooks": "error",
"react/display-name": "off",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/prop-types": "off",
"testing-library/no-await-sync-query": "error",
"testing-library/no-debug": "error"
},
"settings": {
"react": {
"version": "detect"
}
}
}
Couple of things I've seen in your setup:
you are using "plugin:testing-library/recommended" preset, but the best one for React is "plugin:testing-library/react" as it will enable recommended + react ones. That will enable all the rules with "React" badge under configuration columns
after you change this, you can remove both rules you manually added in your eslint config as they are automatically enabled by react preset
I'm not sure what you mean by "If I break rules from other plugins, they are caught". Let me know if enabling react preset fix this for you. If not, it would be nice to have a small repo to reproduce the error.

DEPS_RESOLVE_FAILED on module when building a web application with Brunch in ES6

I'm having an issue when building my web application using Brunch. My application depends on a module I've created and uploaded to NPM, and whenever I build it, I get:
DEPS_RESOLVE_FAILED of node_modules/rd-vue-bootstrap/dist/rd-vue-bootstrap.js failed.
Could not load module './bs-button-group.vue' from '/Users/rjuliani/dev/production-manager-ui/node_modules/rd-vue-bootstrap/dist'.
Make sure the file actually exists
The module itself builds just fine, however when I use it from my test web application and build it (the web application) it throw me the above error.
The relevant parts of my package.json file for the module are:
"main": "dist/rd-vue-bootstrap.js",
"files": [
"dist/rd-vue-bootstrap.js",
"dist/rd-vue-bootstrap.js.map",
"dist/rd-vue-bootstrap.min.js",
"src"
],
brunch-config.js
module.exports = {
files: {
javascripts: {
joinTo: 'app.js'
},
templates: {
joinTo: 'app.js'
}
},
plugins: {
babel: {
},
assetsmanager: {
copyTo: {
'vendor': ['node_modules/bootstrap', 'node_modules/jquery', 'node_modules/rd-vue-bootstrap']
},
minTimeSpanSeconds: 10 // assets won't be copied more frequent than once per X seconds.npm
}
}
};
initialize.js (main file for my web application)
import Vue from 'vue';
import RdVueBootstrap from 'rd-vue-bootstrap';
Vue.use(RdVueBootstrap);
Finally, package.json for my test web application
{
"name": "production-manager-ui",
"description": "Simple UI for the production-manager API project",
"version": "0.0.1",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/radical-dreamers/production-manager-ui.git"
},
"scripts": {
"watch": "brunch watch --server",
"build": "brunch build --production"
},
"author": {
"url": "http://www.codelightsoftware.com",
"name": "Rodrigo Juliani",
"email": "srodriki#gmail.com"
},
"keywords": [
"vue",
"brunch"
],
"dependencies": {
"bootstrap": "^3.3.7",
"jquery": "^3.1.0",
"rd-vue-bootstrap": "0.0.6",
"vue": "^1.0.26",
"vue-router": "^0.7.13"
},
"devDependencies": {
"assetsmanager-brunch": "^1.8.1",
"auto-reload-brunch": "^2.7.1",
"babel-brunch": "^6.0.6",
"brunch": "^2.8.2",
"css-brunch": "^2.6.1",
"javascript-brunch": "^2.0.0",
"vue-brunch": "^1.1.2",
"vue-devtools": "^2.0.4"
}
}
Any ideas how to fix this? I've tried many things and nothing seems to be working as of right now :(
Thanks!

Bower install display prompt input message debian

I am getting a problem trying to execute a bower install on my project
I am just executing bower install command on my debian OS
but when this is recognizing the dependencies defined on my bower.json.
its got stuck in a part that I dont understand
this is the last part that i see in my command line
"dependencies": {
"angular": {
"endpoint": {
"name": "angular",
"source": "angular",
"target": "^1.0.8"
},
"canonicalDir": "/home/ricco/.cache/bower/packages/060a9fe0e60a0d3d6c9ed350cde03e61/1.5.4",
"pkgMeta": {
"name": "angular",
"version": "1.5.4",
"license": "MIT",
"main": "./angular.js",
"ignore": [],
"dependencies": {},
"homepage": "https://github.com/angular/bower-angular",
"_release": "1.5.4",
"_resolution": {
"type": "version",
"tag": "v1.5.4",
"commit": "b972d5aa130bef5c4d931f22bd11627207ea35ca"
},
"_source": "https://github.com/angular/bower-angular.git",
"_target": ">=1"
},
"dependencies": {},
"nrDependants": 1
}
},
"nrDependants": 1
}
]
}
]
}
}, {
"type": "input",
"message": "Answer",
"name": "prompt",
"level": "prompt"
then there after dislpaying the
{
"type": "input",
"message": "Answer",
"name": "prompt",
"level": "prompt"
it got stuck there for some reason.
This is my bower.json
{
"name": "ng-boilerplate",
"version": "0.3.2",
"devDependencies": {
"angular": "~1.2",
"angular-mocks": "~1.2",
"bootstrap": "~3.1",
"angular-bootstrap": "~0.10.0",
"angular-ui-router": "~0.2",
"angular-route":"1.5.3",
"angular-resource":"1.5.3"
},
"dependencies": {}
}
I experienced the same issue using the Angular boilerplate ngbp.
I solved the issue by removing the following line from my .bowerrc file:
"json": "bower.json"
Alternatively, see the answer below by #NikolaB. which involves adding resolutions to your bower.json instead of removing this line.
When you specify dependencies for your app via Bower, some of the packages might rely on different versions of the same library. You will have to resolve what version of libraries you want in your app.
If you configure you Bower using "json": "bower.json" inside .bowerrc file, Bower will expect those resolutions to be inside bower.json file. This means that you must have "resolutions" property inside bower.json file.
So, you could try adding "resolutions" property into your bower.json:
{
"name": "ng-boilerplate",
"version": "0.3.2",
"devDependencies": {
"angular": "~1.2",
"angular-mocks": "~1.2",
"bootstrap": "~3.1",
"angular-bootstrap": "~0.10.0",
"angular-ui-router": "~0.2",
"angular-route":"1.5.3",
"angular-resource":"1.5.3"
},
"resolutions": {
"angular": "1.2.12"
}
}

jspm install to a different folder

I want jspm to install to a different directory (wwwroot), so it needs to put it's config.js and jspm_packages folder there. But I want config.js to not include wwwroot because when you're on the website, that is the root () and when it looks for wwwroot\jspm_packages, it is unable to find them. Is there any way to do this?
package.json
{
"name": "angular2-aspnetcore-starter",
"version": "1.0.0",
"description": "Angular2 with Asp.net Core starter kit.",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Ryan Langton",
"license": "ISC",
"jspm": {
"directories": {
"packages": "wwwroot/jspm_packages" // <- need wwwroot for jspm install
},
"configFile": "wwwroot/config.js", // <- need wwwroot for jspm install
"dependencies": {
"angular2": "npm:angular2#2.0.0-beta.1",
"angular2-polyfill": "npm:angular2-polyfill#^0.0.1",
"es6-shim": "github:es-shims/es6-shim#^0.34.1",
"reflect-metadata": "npm:reflect-metadata#0.1.2",
"rxjs": "npm:rxjs#5.0.0-beta.0",
"zonejs": "npm:zone.js#^0.5.10"
},
"devDependencies": {
"babel": "npm:babel-core#^5.8.24",
"babel-runtime": "npm:babel-runtime#^5.8.24",
"core-js": "npm:core-js#^1.1.4"
}
},
"devDependencies": {
"angular2": "2.0.0-beta.1",
"del": "^2.2.0",
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.13",
"gulp": "~3.9.0",
"gulp-typescript": "~2.10.0",
"gulp-watch": "~4.3.5",
"jspm": "^0.16.24",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.0",
"zone.js": "^0.5.10"
}
}
config.js
This file is created by the "json install" command which is part of the build process.
System.config({
baseURL: "/",
defaultJSExtensions: true,
transpiler: "babel",
babelOptions: {
"optional": [
"runtime",
"optimisation.modules.system"
]
},
paths: {
"github:*": "wwwroot/jspm_packages/github/*", // <-- this is wrong, do not want wwwroot here!
"npm:*": "wwwroot/jspm_packages/npm/*" // <-- this is wrong, do not want wwwroot here!
},
map: {
"angular2": "npm:angular2#2.0.0-beta.1",
"angular2-polyfill": "npm:angular2-polyfill#0.0.1",
"babel": "npm:babel-core#5.8.34",
"babel-runtime": "npm:babel-runtime#5.8.34",
"core-js": "npm:core-js#1.2.6",
"es6-shim": "github:es-shims/es6-shim#0.34.1",
"reflect-metadata": "npm:reflect-metadata#0.1.3",
"rxjs": "npm:rxjs#5.0.0-beta.0",
"zonejs": "npm:zone.js#0.5.10",
"github:jspm/nodelibs-assert#0.1.0": {
"assert": "npm:assert#1.3.0"
},
"github:jspm/nodelibs-buffer#0.1.0": {
"buffer": "npm:buffer#3.6.0"
},
"github:jspm/nodelibs-constants#0.1.0": {
"constants-browserify": "npm:constants-browserify#0.0.1"
},
"github:jspm/nodelibs-crypto#0.1.0": {
"crypto-browserify": "npm:crypto-browserify#3.11.0"
},
"github:jspm/nodelibs-events#0.1.1": {
"events": "npm:events#1.0.2"
},
"github:jspm/nodelibs-path#0.1.0": {
"path-browserify": "npm:path-browserify#0.0.0"
},
"github:jspm/nodelibs-process#0.1.2": {
"process": "npm:process#0.11.2"
},
"github:jspm/nodelibs-stream#0.1.0": {
"stream-browserify": "npm:stream-browserify#1.0.0"
},
"github:jspm/nodelibs-string_decoder#0.1.0": {
"string_decoder": "npm:string_decoder#0.10.31"
},
"github:jspm/nodelibs-util#0.1.0": {
"util": "npm:util#0.10.3"
},
"github:jspm/nodelibs-vm#0.1.0": {
"vm-browserify": "npm:vm-browserify#0.0.4"
},
"npm:angular2-polyfill#0.0.1": {
"angular": "npm:angular#1.4.9",
"camelcase": "npm:camelcase#2.0.1",
"dot-prop": "npm:dot-prop#2.2.0"
},
"npm:angular2#2.0.0-beta.1": {
"crypto": "github:jspm/nodelibs-crypto#0.1.0",
"es6-promise": "npm:es6-promise#3.0.2",
"es6-shim": "npm:es6-shim#0.33.13",
"process": "github:jspm/nodelibs-process#0.1.2",
"reflect-metadata": "npm:reflect-metadata#0.1.2",
"rxjs": "npm:rxjs#5.0.0-beta.0",
"zone.js": "npm:zone.js#0.5.10"
},
"npm:angular#1.4.9": {
"process": "github:jspm/nodelibs-process#0.1.2"
},
"npm:asn1.js#4.3.0": {
"assert": "github:jspm/nodelibs-assert#0.1.0",
"bn.js": "npm:bn.js#4.6.4",
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"inherits": "npm:inherits#2.0.1",
"minimalistic-assert": "npm:minimalistic-assert#1.0.0",
"vm": "github:jspm/nodelibs-vm#0.1.0"
},
"npm:assert#1.3.0": {
"util": "npm:util#0.10.3"
},
"npm:babel-runtime#5.8.34": {
"process": "github:jspm/nodelibs-process#0.1.2"
},
"npm:browserify-aes#1.0.5": {
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"buffer-xor": "npm:buffer-xor#1.0.3",
"cipher-base": "npm:cipher-base#1.0.2",
"create-hash": "npm:create-hash#1.1.2",
"crypto": "github:jspm/nodelibs-crypto#0.1.0",
"evp_bytestokey": "npm:evp_bytestokey#1.0.0",
"fs": "github:jspm/nodelibs-fs#0.1.2",
"inherits": "npm:inherits#2.0.1",
"systemjs-json": "github:systemjs/plugin-json#0.1.0"
},
"npm:browserify-cipher#1.0.0": {
"browserify-aes": "npm:browserify-aes#1.0.5",
"browserify-des": "npm:browserify-des#1.0.0",
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"crypto": "github:jspm/nodelibs-crypto#0.1.0",
"evp_bytestokey": "npm:evp_bytestokey#1.0.0"
},
"npm:browserify-des#1.0.0": {
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"cipher-base": "npm:cipher-base#1.0.2",
"crypto": "github:jspm/nodelibs-crypto#0.1.0",
"des.js": "npm:des.js#1.0.0",
"inherits": "npm:inherits#2.0.1"
},
"npm:browserify-rsa#4.0.0": {
"bn.js": "npm:bn.js#4.6.4",
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"constants": "github:jspm/nodelibs-constants#0.1.0",
"crypto": "github:jspm/nodelibs-crypto#0.1.0",
"randombytes": "npm:randombytes#2.0.2"
},
"npm:browserify-sign#4.0.0": {
"bn.js": "npm:bn.js#4.6.4",
"browserify-rsa": "npm:browserify-rsa#4.0.0",
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"create-hash": "npm:create-hash#1.1.2",
"create-hmac": "npm:create-hmac#1.1.4",
"crypto": "github:jspm/nodelibs-crypto#0.1.0",
"elliptic": "npm:elliptic#6.1.0",
"inherits": "npm:inherits#2.0.1",
"parse-asn1": "npm:parse-asn1#5.0.0",
"stream": "github:jspm/nodelibs-stream#0.1.0"
},
"npm:buffer-xor#1.0.3": {
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"systemjs-json": "github:systemjs/plugin-json#0.1.0"
},
"npm:buffer#3.6.0": {
"base64-js": "npm:base64-js#0.0.8",
"child_process": "github:jspm/nodelibs-child_process#0.1.0",
"fs": "github:jspm/nodelibs-fs#0.1.2",
"ieee754": "npm:ieee754#1.1.6",
"isarray": "npm:isarray#1.0.0",
"process": "github:jspm/nodelibs-process#0.1.2"
},
"npm:cipher-base#1.0.2": {
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"inherits": "npm:inherits#2.0.1",
"stream": "github:jspm/nodelibs-stream#0.1.0",
"string_decoder": "github:jspm/nodelibs-string_decoder#0.1.0"
},
"npm:constants-browserify#0.0.1": {
"systemjs-json": "github:systemjs/plugin-json#0.1.0"
},
"npm:core-js#1.2.6": {
"fs": "github:jspm/nodelibs-fs#0.1.2",
"path": "github:jspm/nodelibs-path#0.1.0",
"process": "github:jspm/nodelibs-process#0.1.2",
"systemjs-json": "github:systemjs/plugin-json#0.1.0"
},
"npm:core-util-is#1.0.2": {
"buffer": "github:jspm/nodelibs-buffer#0.1.0"
},
"npm:create-ecdh#4.0.0": {
"bn.js": "npm:bn.js#4.6.4",
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"crypto": "github:jspm/nodelibs-crypto#0.1.0",
"elliptic": "npm:elliptic#6.1.0"
},
"npm:create-hash#1.1.2": {
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"cipher-base": "npm:cipher-base#1.0.2",
"crypto": "github:jspm/nodelibs-crypto#0.1.0",
"fs": "github:jspm/nodelibs-fs#0.1.2",
"inherits": "npm:inherits#2.0.1",
"ripemd160": "npm:ripemd160#1.0.1",
"sha.js": "npm:sha.js#2.4.4"
},
"npm:create-hmac#1.1.4": {
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"create-hash": "npm:create-hash#1.1.2",
"crypto": "github:jspm/nodelibs-crypto#0.1.0",
"inherits": "npm:inherits#2.0.1",
"stream": "github:jspm/nodelibs-stream#0.1.0"
},
"npm:crypto-browserify#3.11.0": {
"browserify-cipher": "npm:browserify-cipher#1.0.0",
"browserify-sign": "npm:browserify-sign#4.0.0",
"create-ecdh": "npm:create-ecdh#4.0.0",
"create-hash": "npm:create-hash#1.1.2",
"create-hmac": "npm:create-hmac#1.1.4",
"diffie-hellman": "npm:diffie-hellman#5.0.1",
"inherits": "npm:inherits#2.0.1",
"pbkdf2": "npm:pbkdf2#3.0.4",
"public-encrypt": "npm:public-encrypt#4.0.0",
"randombytes": "npm:randombytes#2.0.2"
},
"npm:des.js#1.0.0": {
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"inherits": "npm:inherits#2.0.1",
"minimalistic-assert": "npm:minimalistic-assert#1.0.0"
},
"npm:diffie-hellman#5.0.1": {
"bn.js": "npm:bn.js#4.6.4",
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"crypto": "github:jspm/nodelibs-crypto#0.1.0",
"miller-rabin": "npm:miller-rabin#4.0.0",
"randombytes": "npm:randombytes#2.0.2",
"systemjs-json": "github:systemjs/plugin-json#0.1.0"
},
"npm:elliptic#6.1.0": {
"bn.js": "npm:bn.js#4.6.4",
"brorand": "npm:brorand#1.0.5",
"hash.js": "npm:hash.js#1.0.3",
"inherits": "npm:inherits#2.0.1",
"systemjs-json": "github:systemjs/plugin-json#0.1.0"
},
"npm:es6-promise#3.0.2": {
"process": "github:jspm/nodelibs-process#0.1.2"
},
"npm:es6-shim#0.33.13": {
"process": "github:jspm/nodelibs-process#0.1.2"
},
"npm:evp_bytestokey#1.0.0": {
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"create-hash": "npm:create-hash#1.1.2",
"crypto": "github:jspm/nodelibs-crypto#0.1.0"
},
"npm:hash.js#1.0.3": {
"inherits": "npm:inherits#2.0.1"
},
"npm:inherits#2.0.1": {
"util": "github:jspm/nodelibs-util#0.1.0"
},
"npm:miller-rabin#4.0.0": {
"bn.js": "npm:bn.js#4.6.4",
"brorand": "npm:brorand#1.0.5"
},
"npm:parse-asn1#5.0.0": {
"asn1.js": "npm:asn1.js#4.3.0",
"browserify-aes": "npm:browserify-aes#1.0.5",
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"create-hash": "npm:create-hash#1.1.2",
"evp_bytestokey": "npm:evp_bytestokey#1.0.0",
"pbkdf2": "npm:pbkdf2#3.0.4",
"systemjs-json": "github:systemjs/plugin-json#0.1.0"
},
"npm:path-browserify#0.0.0": {
"process": "github:jspm/nodelibs-process#0.1.2"
},
"npm:pbkdf2#3.0.4": {
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"child_process": "github:jspm/nodelibs-child_process#0.1.0",
"create-hmac": "npm:create-hmac#1.1.4",
"crypto": "github:jspm/nodelibs-crypto#0.1.0",
"path": "github:jspm/nodelibs-path#0.1.0",
"process": "github:jspm/nodelibs-process#0.1.2",
"systemjs-json": "github:systemjs/plugin-json#0.1.0"
},
"npm:process#0.11.2": {
"assert": "github:jspm/nodelibs-assert#0.1.0"
},
"npm:public-encrypt#4.0.0": {
"bn.js": "npm:bn.js#4.6.4",
"browserify-rsa": "npm:browserify-rsa#4.0.0",
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"create-hash": "npm:create-hash#1.1.2",
"crypto": "github:jspm/nodelibs-crypto#0.1.0",
"parse-asn1": "npm:parse-asn1#5.0.0",
"randombytes": "npm:randombytes#2.0.2"
},
"npm:randombytes#2.0.2": {
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"crypto": "github:jspm/nodelibs-crypto#0.1.0",
"process": "github:jspm/nodelibs-process#0.1.2"
},
"npm:readable-stream#1.1.13": {
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"core-util-is": "npm:core-util-is#1.0.2",
"events": "github:jspm/nodelibs-events#0.1.1",
"inherits": "npm:inherits#2.0.1",
"isarray": "npm:isarray#0.0.1",
"process": "github:jspm/nodelibs-process#0.1.2",
"stream-browserify": "npm:stream-browserify#1.0.0",
"string_decoder": "npm:string_decoder#0.10.31"
},
"npm:reflect-metadata#0.1.2": {
"assert": "github:jspm/nodelibs-assert#0.1.0",
"process": "github:jspm/nodelibs-process#0.1.2"
},
"npm:reflect-metadata#0.1.3": {
"assert": "github:jspm/nodelibs-assert#0.1.0",
"process": "github:jspm/nodelibs-process#0.1.2"
},
"npm:ripemd160#1.0.1": {
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"process": "github:jspm/nodelibs-process#0.1.2"
},
"npm:rxjs#5.0.0-beta.0": {
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"process": "github:jspm/nodelibs-process#0.1.2"
},
"npm:sha.js#2.4.4": {
"buffer": "github:jspm/nodelibs-buffer#0.1.0",
"fs": "github:jspm/nodelibs-fs#0.1.2",
"inherits": "npm:inherits#2.0.1",
"process": "github:jspm/nodelibs-process#0.1.2"
},
"npm:stream-browserify#1.0.0": {
"events": "github:jspm/nodelibs-events#0.1.1",
"inherits": "npm:inherits#2.0.1",
"readable-stream": "npm:readable-stream#1.1.13"
},
"npm:string_decoder#0.10.31": {
"buffer": "github:jspm/nodelibs-buffer#0.1.0"
},
"npm:util#0.10.3": {
"inherits": "npm:inherits#2.0.1",
"process": "github:jspm/nodelibs-process#0.1.2"
},
"npm:vm-browserify#0.0.4": {
"indexof": "npm:indexof#0.0.1"
},
"npm:zone.js#0.5.10": {
"es6-promise": "npm:es6-promise#3.0.2",
"process": "github:jspm/nodelibs-process#0.1.2"
}
}
});
Couple of options. Are all your components/custom JS also in wwwroot? If so, I'd just install jspm to that directory and then jspm will just look in the current dir...which will be wwwroot locally, but in production it will just look at your root dir for the website.
A second option, which is also recommended as it is faster, would be to bundle all your dependencies using jspm bundle, and then JSPM will be able to find them correctly. That is just bundle all deps into bundle.js, put that in wwwroot, and then in your index file after you load system.js just do:
System.import('./bundle.js').then( () => { ... }

jspm is not show meaningful error on the browser

I'm using jspm, so far it's not showing meaningful error when there was mistake in the code
package.json
{
"devDependencies": {
"jspm": "^0.16.19"
},
"jspm": {
"dependencies": {
"react": "npm:react#^0.14.3",
"react-dom": "npm:react-dom#^0.14.3"
},
"devDependencies": {
"babel": "npm:babel-core#^5.8.24",
"babel-runtime": "npm:babel-runtime#^5.8.24",
"core-js": "npm:core-js#^1.1.4"
}
}
}
config.js
System.config({
baseURL: "/",
defaultJSExtensions: true,
transpiler: "babel",
babelOptions: {
"optional": [
"runtime",
"optimisation.modules.system"
]
},
...
});
For example if I made some mistake in the code e.g. import xxx fro 'xxx'; or class Foo exten Bar {}, on the browser's console it only shown
Do I need some extra configurations?, please guide.
Thanks

Resources