syndesisio / syndesis-ui

The front end application or UI for Syndesis - a flexible, customizable, cloud-hosted platform that provides core integration capabilities as a service. It leverages Red Hat's existing product architecture using OpenShift Online/Dedicated and Fuse Integration Services.
https://syndesis.io/
14 stars 28 forks source link

Error from `npm start` #25

Closed gashcrumb closed 8 years ago

gashcrumb commented 8 years ago

Not sure if it's Windows specific or not, but after updating locally, clearing out node_modules and running npm install, npm start gives me:

C:\Source\hawtio-ipaas\node_modules\webpack\lib\webpack.js:16                                                                          
                throw new WebpackOptionsValidationError(webpackOptionsValidationErrors);                                               
        ^                                                                                                                              
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not ma
tch the API schema.                                                                                                                    
 - configuration has an unknown property 'tslint'. These properties are valid:                                                         
   object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry, externals?, loader?, module?, name?, node?, outp
ut?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, stats?, target?, watch?, watchO
ptions? }                                                                                                                              
   For typos: please correct them.                                                                                                     
   For loader options: webpack 2 no longer allows custom properties in configuration.                                                  
     Loaders should be updated to allow passing options via loader options in module.rules.                                            
     Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:                                
     plugins: {                                                                                                                        
       new webpack.LoaderOptionsPlugin({                                                                                               
         // test: /\.xxx$/, // may apply this only for some modules                                                                    
         options: {                                                                                                                    
           tslint: ...                                                                                                                 
         }                                                                                                                             
       })                                                                                                                              
     }                                                                                                                                 
 - configuration.module has an unknown property 'preLoaders'. These properties are valid:                                              
   object { exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, loaders?, noParse?, rules?, unknownCo
ntextCritical?, unknownContextRecursive?, unknownContextRegExp?, unknownContextRequest?, wrappedContextCritical?, wrappedContextRecursi
ve?, wrappedContextRegExp? }                                                                                                           
   Options affecting the normal modules (`NormalModuleFactory`).                                                                       
 - configuration.node.global should be a boolean.                                                                                      
 - configuration.resolve has an unknown property 'modulesDirectories'. These properties are valid:                                     
   object { alias?, aliasFields?, cachePredicate?, descriptionFiles?, enforceExtension?, enforceModuleExtension?, extensions?, fileSyst
em?, mainFields?, mainFiles?, moduleExtensions?, modules?, plugins?, resolver?, symlinks?, unsafeCache? }                              
 - configuration.resolve.extensions[0] should not be empty.                                                                            
    at webpack (C:\Source\hawtio-ipaas\node_modules\webpack\lib\webpack.js:16:9)                                                       
    at processOptions (C:\Source\hawtio-ipaas\node_modules\webpack-dev-server\bin\webpack-dev-server.js:269:17)                        
    at Object.<anonymous> (C:\Source\hawtio-ipaas\node_modules\webpack-dev-server\bin\webpack-dev-server.js:297:1)                     
    at Module._compile (module.js:556:32)                                                                                              
    at Object.Module._extensions..js (module.js:565:10)                                                                                
    at Module.load (module.js:473:32)                                                                                                  
    at tryModuleLoad (module.js:432:12)                                                                                                
    at Function.Module._load (module.js:424:3)                                                                                         
    at Module.runMain (module.js:590:10)                                                                                               
    at run (bootstrap_node.js:394:7)                                                                                                   
    at startup (bootstrap_node.js:149:9)                                                                                               
    at bootstrap_node.js:509:3                                                                                                                                                                                                                                                

@kahboom ping

gashcrumb commented 8 years ago

Was going to try installing tslint-loader and using it's example config, however it fails to install here. Wonder though, looking at the config it seems to be basically turned off, maybe we should keep that out for now? Looks though like there's other webpack config items that'll need updating.

kahboom commented 8 years ago

Hmm I wonder when the latest pull you made was? I would delete your npm-shrinkwrap and run that magical cleanup alias, reinstall npm packages and try again.

kahboom commented 8 years ago

There have been issues with the shrinkwrap, so I was thinking that while the application is under development that maybe we should remove it completely.

gashcrumb commented 8 years ago

yeah, maybe the shrinkwrap is a better thing for a product branch.

gashcrumb commented 8 years ago

Hmm, no luck removing the shrinkwrap, it looks like it's still failing with the same reported error.

gashcrumb commented 8 years ago

Oh, also just in case:

C:\Source\hawtio-ipaas [master ≡ +0 ~0 -1 !]> npm --version
3.4.1
C:\Source\hawtio-ipaas [master ≡ +0 ~0 -1 !]> node -v
v6.6.0
gashcrumb commented 8 years ago

Making this change to package.json fixes the reported error for me:

    "webpack": "2.1.0-beta.21",
    "webpack-dev-middleware": "1.6.1",
    "webpack-dev-server": "2.1.0-beta.2",
    "webpack-md5-hash": "0.0.5",
    "webpack-merge": "0.14.1"

So we may need to consider locking down even our dev dependencies and carefully evaluate updates. I guess they're not to worried about making breaking changes to the config in beta versions of webpack. I did however get this error once npm start uh started up:

WARNING in ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
45:15 Critical dependency: the request of a dependency is an expression

WARNING in ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
57:15 Critical dependency: the request of a dependency is an expression

ERROR in ./src/app/app.module.ts
Module not found: Error: Can't resolve '@ng-bootstrap/ng-bootstrap' in 'C:\Source\hawtio-ipaas\src\app'
 @ ./src/app/app.module.ts 24:21-58
 @ ./src/app/index.ts
 @ ./src/main.browser.ts
 @ multi main