Aurelia JSPM install -y not working on window

2019-09-04 01:51发布

问题:

I am doing the aurelia tutorial http://aurelia.io/get-started.html

Im trying to install aurelia dependencies using gulp and jspm. I runned "jspm install -y" with no problem.

And when I go to the browser and open the console i have this error:

localhost/:5 GET http://localhost/proyectos/fabho/Aurelia/firstApp/navigation-app/jspm_packages/npm/font-awesome@4.2.0/css/font-awesome.min.css 404 (Not Found)
es6-module-loader.src.js:2563 GET http://localhost/proyectos/fabho/Aurelia/firstApp/navigation-app/jspm_packages/github/aurelia/loader-default@0.4.3.js 404 (Not Found)
es6-module-loader.src.js:140 Potentially unhandled rejection [3] Error loading "github:aurelia/loader-default@0.4.3" at http://localhost/proyectos/fabho/Aurelia/firstApp/navigation-app/jspm_packages/github/aurelia/loader-default@0.4.3.js
Error loading "github:aurelia/loader-default@0.4.3" from "github:aurelia/bootstrapper@0.9.5" at http://localhost/proyectos/fabho/Aurelia/firstApp/navigation-app/jspm_packages/github/aurelia/bootstrapper@0.9.5.js
Not Found: http://localhost/proyectos/fabho/Aurelia/firstApp/navigation-app/jspm_packages/github/aurelia/loader-default@0.4.3.js (WARNING: non-Error used)
es6-module-loader.src.js:2563 GET http://localhost/proyectos/fabho/Aurelia/firstApp/navigation-app/jspm_packages/github/aurelia/logging-console@0.2.4.js 404 (Not Found)
es6-module-loader.src.js:2563 GET http://localhost/proyectos/fabho/Aurelia/firstApp/navigation-app/jspm_packages/github/aurelia/binding@0.3.7.js 404 (Not Found)
es6-module-loader.src.js:2563 GET http://localhost/proyectos/fabho/Aurelia/firstApp/navigation-app/jspm_packages/github/aurelia/templating@0.8.14.js 404 (Not Found)

I try to fix this with:

  • npm uninstall jspm -g and then npm install jpsm -g
  • npm install jspm
  • install -g -f npm install -gf jspm/jspm-cli

But it does not work. Can you help me with this issue pls

回答1:

I solve this problem using yeoman. The problem was with jspm.

  • npm install -g yo
  • npm install -g generator-aurelia
  • mkdir your_aurelia_app_name
  • cd your_aurelia_app_name
  • yo aurelia
  • npm install
  • npm install -g gulp
  • npm install -g jspm
  • jspm endpoint config github
  • jspm install
  • gulp watch

Some details more http://fabhojs.blogspot.com/2015/03/aurelia-app-skeleton-yeoman-generator.html



回答2:

It seems that you uninstalled globally with -g and tried to install without it.

Anyway, what worked for me was:

Start a cmd prompt as Admin, install gulp and jspm globally (-g option) Then navigate to your app folder and install all depencies with npm then jspm



回答3:

I think you need to start Command prompt as a administrator and then go to your application folder

like

C:\aureliaapp\Myapp>

and run command "gulp watch" before run this command you need to run these command also

npm install -g gulp

npm install -g jspm

If both command already done then run only "gulp watch" for your application.



回答4:

The sample app starts in local port 9000.

Are you browsing to localhost:9000 ?

I don't see a port number in your error messages.