Installation with angular-seed not working
See original GitHub issueI’m getting the error:
(SystemJS) XHR error (404 Not Found) loading http://localhost:5556/node_modules/ng2-ckeditor.js
I’m referencing the module in my SharedModule where other modules are imported.
import { CKEditorModule } from 'ng2-ckeditor';
In my project.config.ts file, I have this set:
this.APP_ASSETS = [
...this.APP_ASSETS,
{ src: `${this.CSS_SRC}/font-awesome/css/font-awesome.min.css`, inject: true, vendor: false },
{ src: '//cdn.ckeditor.com/4.5.11/full/ckeditor.js', inject: true, vendor: false }
];
In my seed.config.ts file, I have this:
SYSTEM_CONFIG_DEV: any = {
defaultJSExtensions: true,
paths: {
[this.BOOTSTRAP_MODULE]: `${this.APP_BASE}${this.BOOTSTRAP_MODULE}`,
'@angular/common': 'node_modules/@angular/common/bundles/common.umd.js',
'@angular/compiler': 'node_modules/@angular/compiler/bundles/compiler.umd.js',
'@angular/core': 'node_modules/@angular/core/bundles/core.umd.js',
'@angular/forms': 'node_modules/@angular/forms/bundles/forms.umd.js',
'@angular/http': 'node_modules/@angular/http/bundles/http.umd.js',
'@angular/platform-browser': 'node_modules/@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/platform-browser-dynamic': 'node_modules/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
'@angular/router': 'node_modules/@angular/router/bundles/router.umd.js',
'@angular/common/testing': 'node_modules/@angular/common/bundles/common-testing.umd.js',
'@angular/compiler/testing': 'node_modules/@angular/compiler/bundles/compiler-testing.umd.js',
'@angular/core/testing': 'node_modules/@angular/core/bundles/core-testing.umd.js',
'@angular/http/testing': 'node_modules/@angular/http/bundles/http-testing.umd.js',
'@angular/platform-browser/testing': 'node_modules/@angular/platform-browser/bundles/platform-browser-testing.umd.js',
'@angular/platform-browser-dynamic/testing': 'node_modules/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
'@angular/router/testing': 'node_modules/@angular/router/bundles/router-testing.umd.js',
'ng2-ckeditor': 'node_modules/ng2-ckeditor',
'primeng': 'node_modules/primeng',
'app/*': '/app/*',
// For test config
'dist/dev/*': '/base/dist/dev/*',
'*': 'node_modules/*'
},
packages: {
}
};
SYSTEM_BUILDER_CONFIG: any = {
defaultJSExtensions: true,
base: this.PROJECT_ROOT,
packageConfigPaths: [
join('node_modules', '*', 'package.json'),
join('node_modules', '@angular', '*', 'package.json')
],
paths: {
// Note that for multiple apps this configuration need to be updated
// You will have to include entries for each individual application in
// `src/client`.
[join(this.TMP_DIR, this.BOOTSTRAP_DIR, '*')]: `${this.TMP_DIR}/${this.BOOTSTRAP_DIR}/*`,
'dist/tmp/node_modules/*': 'dist/tmp/node_modules/*',
'node_modules/*': 'node_modules/*',
'*': 'node_modules/*'
},
packages: {
'@angular/common': {
main: 'index.js',
defaultExtension: 'js'
},
'@angular/compiler': {
main: 'index.js',
defaultExtension: 'js'
},
'@angular/core/testing': {
main: 'index.js',
defaultExtension: 'js'
},
'@angular/core': {
main: 'index.js',
defaultExtension: 'js'
},
'@angular/forms': {
main: 'index.js',
defaultExtension: 'js'
},
'@angular/http': {
main: 'index.js',
defaultExtension: 'js'
},
'@angular/platform-browser': {
main: 'index.js',
defaultExtension: 'js'
},
'@angular/platform-browser-dynamic': {
main: 'index.js',
defaultExtension: 'js'
},
'@angular/router': {
main: 'index.js',
defaultExtension: 'js'
},
'rxjs': {
main: 'Rx.js',
defaultExtension: 'js'
},
'ng2-ckeditor': {
main: 'lib/index.js',
defaultExtension: 'js',
},
'primeng': {
main: './primeng.js',
defaultExtension: 'js'
}
}
};
Any help is appreciated.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
npm install errors in angular seed - Stack Overflow
I have the node v6.1.0 installed with npm v3.8.9. I am running Ubuntu 14.04 LTS. I followed some of the troubleshooting tips for...
Read more >Unable to get npm install to work from angular-seed template
npm ERR! Failed at the phan...@1.9.16 install script. npm ERR! This is most likely a problem with the phantomjs package,. npm ERR! not...
Read more >Angular Seed - GitHub Pages
Official Angular i18n support. Ready to go, statically typed build system using gulp for working with TypeScript. Production and development builds. Ahead-of- ...
Read more >angular-seed - npm
Keywords · Install · Repository · Homepage · Weekly Downloads · Version · License · Issues · Pull Requests.
Read more >Creating a NodeJS Web Server to Run angular-seed
The process for setting up a basic AngularJS app using angular-seed and running on a NodeJS server is fairly straight forward. If you...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @brightonhall , Either you need to give path to ckeditor.js in index.html as <script>https://cdn.ckeditor.com/4.5.11/full/ckeditor.js</script> or you need to download ckeditor from http://ckeditor.com/download and then add to project.config.ts inside this.APP_ASSETS as following:- { src:
${this.ASSETS_SRC}/ckeditor/ckeditor.js
, inject: true, vendor: false } Also you need to place ckeditor inside asssets folder.@gauravsoni119 - I did try this and it didn’t work, but I think I know why now. See below.
@KillerCodeMonkey - your #1 item helped, but I didn’t need the ‘format’ property, I needed more (see below). Also I like this seed project because it does a lot for me, like build for dev, build for prod, and bundle and minify all files into a small distributable. Something it would take me lots of manual work to preform, something I don’t want to do. :^)
@tonychangcheng - it was your suggestion of adding the ckeditor/ckeditor.js into the project.config.ts file. This is what I was missing. I thought it was enough to just add the ng2-ckeditor to the config, and I was wrong.
Thank you to everyone, it is now working perfectly with no errors.