-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Aurelia CLI build errors with Velocity UI Pack #13
Comments
As a workaround, create a module named 'velocity' that returns scripts/velocity-shim.js: define('velocity', ['velocity-animate'], function(velocity) {
return velocity;
}); aurelia.json: ...
"aurelia-animator-velocity",
{
"name": "velocity-animate",
"path": "../node_modules/velocity-animate",
"main": "velocity",
"deps": ["jquery"],
"resources": ["velocity.ui.js"]
},
{
"name": "velocity",
"path": "../scripts/velocity-shim"
},
... |
Really great analysis and I will use the workaround until #309 is resolved. The animations are working, but Chrome Debug console still shows this error below. It is basically complaining about the anonymous define/factory function inside file "node_modules\velocity-animate\velocity.ui.js". Note: I am using velocity UI pack which is very helpful. Perhaps this segment from the chrome error message link RequireJS mismatch provides a clue. Maybe this relates to CLI bundling, but I cannot figure it out. Chrome Debug Console Error: For future readers, with this fix it appears you still must do the following: |
@jdanyow Should we change the name we are using in our source code to import the library? or si this a difference between the npm and jspm packages? |
Closing this since the other issue tracks the real problem. |
I'm submitting a bug report
Library Version: 0.17.0
Operating System: Windows 10
Node Version: 6.2.0
NPM Version: 3.8.9
Browser: Chrome
Language: TypeScript
As I migrated my project from Aurelia JSPM to the CLI I can no longer get Aurelia Velocity working. Below is the exact sequence, from scratch, that produces error (Also below). Aurelia with Velocity animations is really awesome, but I am really stuck on this problem.
Create Aurelia CLI project and then execute bash commands:
au new - Custom/Typescript/Sass/No Test/VSCode
npm install aurelia-animator-velocity --save
typings install dt~velocity-animate --save --global
Add dependencies into aurelia.json:
"velocity-animate",
{
"name": "aurelia-animator-velocity",
"path": "../node_modules/aurelia-animator-velocity/dist/amd",
"main": "aurelia-animator-velocity"
}
Add code to app.ts to bring in aurelia-animator-velocity:
import {VelocityAnimator} from "aurelia-animator-velocity";
Comment out below in aurelia-animator-velocity.d.ts (Separate Issue):
//import velocity from 'velocity-animate';
Running "au build" produces error below. The current issue is the path to velocity.ui.js should not contains src. Not sure if this a CLI issue or a velocity.ui.js path issue within animator-velocity.
The text was updated successfully, but these errors were encountered: