"lodash/defaultsDeep" systemJS Error
I just rebuild my whole node_modules folder and I ran into this error message
(SystemJS) Module not already loaded loading "lodash/defaultsDeep"
I'm on angular 4.0.2 and atc 3.3.1. I also tried using atc 3.2.4 which did work in that regard.
This is my atc entry in the systemJS config:
'angular-tree-component': 'npm:angular-tree-component/dist/angular-tree-component.umd.js',
I am also getting same error. Please let me know the solution.
Hi all, Adding the following block to system.config.js seems to do the trick for now. I'm sure there is a better way of doing this.
meta: {
'angular-tree-component': {
deps: [
'lodash/first.js',
'lodash/last.js',
'lodash/compact.js',
'lodash/find.js',
'lodash/includes.js',
'lodash/remove.js',
'lodash/indexOf.js',
'lodash/pullAt.js',
'lodash/pick.js',
'lodash/defaultsDeep.js']
}
},
@gpapp I tried that but still getting the same error!
I change every steps to angular2-tree-component instead of angular-tree-component and it's worked.
Install
npm install --save angular2-tree-component
Add to systemjs.config.js
'angular2-tree-component': 'node_modules/angular2-tree-component/dist/angular2-tree-component.umd.js',
Import module
import { TreeModule } from 'angular2-tree-component';
@gpapp how the rest of your system.config file looks like? I'm still getting the same error
@MonkeyDoll that's an older version of the component. You will get a warning message while installing the package.
This is probably not going to help a lot, but I switched over to webpack and the problem disappeared, so it is definitely a problem related to systemjs.
Hi.. can some one help me here ?? No response on the below question from the owner as well...
npm install angular-tree-component
I have installed angular-tree-component version 3.3.0 . In appmodule.ts when i try to import the Tree Module, I am not able to get the reference by just using import { TreeModule } from 'angular-tree-component';
I need to reach dist/angular-tree-component and then TreeModule can be imported. and when running the app in IE 11 , chrome this gives me an error " Unexpected Token import " .
I am using Webpack with angular version 2.4.8 .
Any suggestions ?
where i can find system.config.js ? ( where is located? )
i've latest angular 4 and angular-cli
npm install --save angular-tree-component
Hi all, Adding the following block to system.config.js seems to work for me now.
paths: {
'npm:': 'node_modules/'
},
map: {
.....
'lodash': 'npm:lodash',
'angular-tree-component': 'npm:angular-tree-component/dist'
.....
},
packages: {
....
lodash: { defaultExtension: 'js' },
'angular-tree-component': { format: 'cjs', main: 'angular-tree-component.umd.js', defaultExtension: 'js' }
.....
}
I have issues when using it with webpack . Any idea how it's done. I have raised issue on this, but no one has replied yet.
On Apr 29, 2017 2:23 PM, "Andrey" [email protected] wrote:
Hi all, Adding the following block to system.config.js seems to work for me now.
...... map: { ..... 'lodash': 'npm:lodash', 'angular-tree-component': 'npm:angular-tree-component/dist' ..... }, packages: { .... lodash: { defaultExtension: 'js' }, 'angular-tree-component': { format: 'cjs', main: 'angular-tree-component.umd.js', defaultExtension: 'js' } ..... }
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/500tech/angular-tree-component/issues/262#issuecomment-298156660, or mute the thread https://github.com/notifications/unsubscribe-auth/AStMS6uohZauUZPpXufkhTeEhNsOvC-Oks5r0vqTgaJpZM4NB2b8 .
First of all - I recommend everyone to switch to webpack, it's much better in any case than SystemJS. Second - I added lodash to the bundle in 3.4.1. Can you check with that version?
@adamkleingi, I tried with 3.4.1 also no luck. I could not use webpack in my project as we commited to use systemjs only. Any other possibilities.?
sasinandrei's worked the key for me was missing this (I think it was the format 'cjs')
'angular-tree-component': { format: 'cjs', main: 'angular-tree-component.umd.js', defaultExtension: 'js' }
Thanks @sasinandrei , helped me out a lot.
@sasinandrei - thanks. I dropped support for SystemJS, closing this one.