Closed shaoahs closed 8 years ago
What is the error you are getting here? Do you mean it works in every case except when folder name
is src
?
create new project like this
Package.json file does not exist, create it? [Yes]: Yes
Init Mode (Quick, Standard, Custom) [Quick]: Standard
Local package name (recommended, optional): app
package.json directories.lib [src]: web/<folder name>
package.json directories.baseURL (optional): web
package.json directories.packages [web/jspm_packages]: web/jspm_packages
System.config browser baseURL (optional): ./
System.config browser URL to web/<folder name> [ <folder name> ]: <folder name>
System.config browser URL to web/jspm_packages [web/jspm_packages]: web/jspm_packages
System.config local package main [app.js]: app.js
System.config local package format (esm, cjs, amd): amd
System.config transpiler (Babel, Traceur, TypeScript, None) [babel]: babel
<folder name> if type 'src' , then
jspm bundle <folder name>/main.js
error message
[dott@localhost t03]$ jspm bundle src/main.js
Building the bundle tree for src/main.js...
err Error on translate for app/main.js at file:///home/dott/html/javascript/astro/proj/t03/web/src/main.js
TypeError: plugin-babel cannot transpile amd modules. Ensure "file:///home/dott/html/javascript/astro/proj/t03/web/src/main.js" is configured not to use this loader.
at SystemJSNodeLoader.exports.translate (file:///home/dott/html/javascript/astro/proj/t03/web/jspm_packages/npm/systemjs-plugin-babel@0.0.10/plugin-babel.js:68:11)
at SystemJSNodeLoader.<anonymous> (/home/dott/html/javascript/astro/proj/t03/node_modules/systemjs/dist/system.src.js:4462:69)
at SystemJSNodeLoader.<anonymous> (/home/dott/html/javascript/astro/proj/t03/node_modules/systemjs/dist/system.src.js:4853:24)
at /home/dott/html/javascript/astro/proj/t03/node_modules/systemjs-builder/lib/trace.js:430:25
at tryCatcher (/home/dott/html/javascript/astro/proj/t03/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/dott/html/javascript/astro/proj/t03/node_modules/bluebird/js/release/promise.js:502:31)
at Promise._settlePromise (/home/dott/html/javascript/astro/proj/t03/node_modules/bluebird/js/release/promise.js:559:18)
at Promise._settlePromise0 (/home/dott/html/javascript/astro/proj/t03/node_modules/bluebird/js/release/promise.js:604:10)
at Promise._settlePromises (/home/dott/html/javascript/astro/proj/t03/node_modules/bluebird/js/release/promise.js:683:18)
at Promise._fulfill (/home/dott/html/javascript/astro/proj/t03/node_modules/bluebird/js/release/promise.js:628:18)
at Promise._resolveCallback (/home/dott/html/javascript/astro/proj/t03/node_modules/bluebird/js/release/promise.js:423:57)
at Promise._settlePromiseFromHandler (/home/dott/html/javascript/astro/proj/t03/node_modules/bluebird/js/release/promise.js:514:17)
at Promise._settlePromise (/home/dott/html/javascript/astro/proj/t03/node_modules/bluebird/js/release/promise.js:559:18)
at Promise._settlePromise0 (/home/dott/html/javascript/astro/proj/t03/node_modules/bluebird/js/release/promise.js:604:10)
at Promise._settlePromises (/home/dott/html/javascript/astro/proj/t03/node_modules/bluebird/js/release/promise.js:683:18)
at Promise._fulfill (/home/dott/html/javascript/astro/proj/t03/node_modules/bluebird/js/release/promise.js:628:18)
And what is the contents of file:///home/dott/html/javascript/astro/proj/t03/web/src/main.js
?
only
console.log("test log");
This should be working better in the latest jspm 0.17 release. Let me know if you're still having issues.
If the support you've received on this issue has helped your project, perhaps consider leaving a tip for the maintainer.
if create new project like this
main.js
console.log("test log !");
package.jsonjspm.browser.js
<folder name> can use any name , but can't use 'src'
usejspm bundle <folder name>/group/test/main.js
has error why?