formio / angular

JSON powered forms for Angular
https://formio.github.io/angular-demo
MIT License
635 stars 468 forks source link

Problem building a local library #151

Closed SpiraMira closed 6 years ago

SpiraMira commented 6 years ago

Hi - I've cloned and built a local version of this library to test some changes.

Linking (npm link) to it from your angular starter builds correctly but I get the following run time error consistently:

Uncaught Error: Unexpected value 'FormioModule' imported by the module 'AppModule'. Please add a @NgModule annotation. at syntaxError (compiler.es5.js:1694) at compiler.es5.js:15398 at Array.forEach () at CompileMetadataResolver.getNgModuleMetadata (compiler.es5.js:15381) at JitCompiler._loadModules (compiler.es5.js:26826) at JitCompiler.compileModuleAndComponents (compiler.es5.js:26799) at JitCompiler.compileModuleAsync (compiler.es5.js:26728) at PlatformRef.bootstrapModuleWithZone (core.es5.js:4536) at PlatformRef.bootstrapModule (core.es5.js:4522) at Object. (index.ts:21) at Object. (index.ts:21) at webpack_require__ (bootstrap 8193945f3a20724b64e2:49) at bootstrap 8193945f3a20724b64e2:147 at bootstrap 8193945f3a20724b64e2:147 syntaxError @ compiler.es5.js:1694 (anonymous) @ compiler.es5.js:15398 CompileMetadataResolver.getNgModuleMetadata @ compiler.es5.js:15381 JitCompiler._loadModules @ compiler.es5.js:26826 JitCompiler.compileModuleAndComponents @ compiler.es5.js:26799 JitCompiler.compileModuleAsync @ compiler.es5.js:26728 PlatformRef.bootstrapModuleWithZone @ core.es5.js:4536 PlatformRef.bootstrapModule @ core.es5.js:4522 (anonymous) @ index.ts:21 (anonymous) @ index.ts:21 webpack_require__ @ bootstrap 8193945f3a20724b64e2:49 (anonymous) @ bootstrap 8193945f3a20724b64e2:147 (anonymous) @ bootstrap 8193945f3a20724b64e2:147

Switching back to the registry (npm i angular-formio) works fine.

There are some issues npm linking with gulp on SO. Any recommendations? I wan to test using angular-formio and ng-bootstrap (versus ngx-bootstrap) I'm ultimately trying to see how this all performs with bootstrap4.

Regards, Patrice

travist commented 6 years ago

You cannot link to this folder, but must link to the "dist" folder which is created by npm run build:dist