如何解决与Angular5的webpack构建错误,我看到... node_modules/xxxx不是编译输出的一部分

我最近升级到了最新的角度调整器,它本身工作正常。然而,在我的项目,我看到了一些类似的错误:如何解决与Angular5的webpack构建错误,我看到... node_modules/xxxx不是编译输出的一部分

Module build failed: Error: /home/joel/.../Tracker3/node_modules/angular2-color-picker/lib/index.ts is not part of the compilation output. 

我已经试过直接包括我tsconfig.json或tsconfig.webpack.json这个源文件,但这些变化都没有效果。显然,我还不知道如何正确处理由于使用angular5添加ngc-webpack所做的更改。

的“新公共管理运行构建”给出:(这表明构建错误的主机)

... 

7377ms building modules

37ms sealing

4ms optimizing

0ms basic module optimization

41ms module optimization

0ms advanced module optimization

12ms basic chunk optimization

0ms chunk optimization

0ms advanced chunk optimization

4ms module and chunk tree optimization

0ms chunk modules optimization

0ms advanced chunk modules optimization

15ms module reviving

8ms module order optimization

18ms module id optimization

6ms chunk reviving

0ms chunk order optimization

28ms chunk id optimization

61ms hashing

0ms module assets processing

5122ms chunk assets processing

6ms additional chunk assets processing

0ms recording

0ms additional asset processing

0ms chunk asset optimization

235ms asset optimization

133ms emitting

Hash: a180140e440f968bc44e

Version: webpack 3.9.1

Time: 16820ms

Asset Size Chunks Chunk Names

assets/icon/tracker/ms-icon-150x150.png 22.5 kB [emitted]

d34bc3300c4ca1084d6416f466e1b7df.gif 75 bytes [emitted]

main.bundle.js 34.2 MB 0 [emitted] [big] main

polyfills.bundle.js 595 kB 1 [emitted] [big] polyfills

inline.bundle.js 5.8 kB 2 [emitted] inline

assets/data.json 30 bytes [emitted]

.

.

.

assets/skins/lightgray/content.min.css 3.33 kB [emitted]

assets/skins/lightgray/fonts/tinymce-small.woff 9.38 kB [emitted]

humans.txt 251 bytes [emitted]

robots.txt 31 bytes [emitted]

index.html 3.03 kB [emitted]

[./$$_lazy_route_resource lazy recursive] ./$$_lazy_route_resource lazy 160 bytes {0} [built]

[] -> factory:62ms building:1ms = 63ms

[./credentials.ts] ./credentials.ts 1.52 kB {0} [built]

[] -> factory:32ms building:1ms = 33ms

[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 509 bytes {0} {1} [built]

[] -> factory:0ms building:0ms = 0ms

[./src/app/app.component.ts] ./src/app/app.component.ts 1.72 kB {0} [built]

[] -> factory:29ms building:1ms dependencies:767ms = 797ms

[./src/app/app.module.ts] ./src/app/app.module.ts 14.8 kB {0} [built]

[] -> factory:230ms building:16ms dependencies:812ms = 1058ms

[./src/app/app.routes.ts] ./src/app/app.routes.ts 542 bytes {0} [built]

[] -> factory:27ms building:1ms dependencies:172ms = 200ms

[./src/app/environment.ts] ./src/app/environment.ts 1.28 kB {0} [built]

[] -> factory:23ms building:1ms dependencies:787ms = 811ms

[./src/app/index.ts] ./src/app/index.ts 37 bytes {0} [built]

[] -> factory:205ms building:1ms = 206ms

[./src/app/tracker/index.ts] ./src/app/tracker/index.ts 234 bytes {0} [built]

[] -> factory:200ms building:0ms = 200ms

[./src/app/tracker/shared/notification/notification.component.ts] ./src/app/tracker/shared/notification/notification.component.ts 3.02 kB {0} [built]

[] -> factory:38ms building:3ms dependencies:758ms = 799ms

[./src/app/tracker/shared/specialNotification/specialNotification.component.ts] ./src/app/tracker/shared/specialNotification/specialNotification.component.ts 3.45 kB {0} [built]

[] -> factory:43ms building:5ms dependencies:751ms = 799ms

[./src/environments/environment.ts] ./src/environments/environment.ts 830 bytes {0} [built]

[] -> factory:195ms building:2ms = 197ms

[./src/main.browser.ts] ./src/main.browser.ts 966 bytes {0} [built]

factory:3701ms building:9ms = 3710ms

[./src/polyfills.browser.ts] ./src/polyfills.browser.ts 2.65 kB {1} [built]

factory:3701ms building:6ms = 3707ms

[./src/service/index.ts] ./src/service/index.ts 323 bytes {0} [built]

[] -> factory:198ms building:1ms dependencies:4781ms = 4980ms

+ 1709 hidden modules

WARNING in ./node_modules/app-root-path/browser-shim.js

10:8-46 Critical dependency: the request of a dependency is an expression

@ ./node_modules/app-root-path/browser-shim.js

@ ./node_modules/codelyzer/angular/config.js

@ ./node_modules/codelyzer/util/logger.js

@ ./src/app/tracker/east/body/taskDetailsBody.component.ts

@ ./src/app/tracker/east/index.ts

@ ./src/app/tracker/index.ts

@ ./src/app/app.module.ts

@ ./src/app/index.ts

@ ./src/main.browser.ts

ERROR in ./node_modules/angular2-color-picker/lib/index.ts

Module build failed: Error: /home/joel/workspace/Tracker3/node_modules/angular2-color-picker/lib/index.ts is not part of the compilation output. Please check the other error messages for details.

at AngularCompilerPlugin.getCompiledFile (/home/joel/workspace/Tracker3/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:648:23)

at plugin.done.then (/home/joel/workspace/Tracker3/node_modules/@ngtools/webpack/src/loader.js:467:39)

at <anonymous>

at process._tickCallback (internal/process/next_tick.js:188:7)

@ ./node_modules/angular2-color-picker/index.js 5:9-31

@ ./src/app/app.module.ts

@ ./src/app/index.ts

@ ./src/main.browser.ts

ERROR in ./node_modules/angular2-logger/app/core/level.ts

Module build failed: Error: /home/joel/workspace/Tracker3/node_modules/angular2-logger/app/core/level.ts is not part of the compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

at AngularCompilerPlugin.getCompiledFile (/home/joel/workspace/Tracker3/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:643:23)

at plugin.done.then (/home/joel/workspace/Tracker3/node_modules/@ngtools/webpack/src/loader.js:467:39)

at <anonymous>

@ ./node_modules/angular2-logger/core.js 6:9-36

@ ./src/app/app.module.ts

@ ./src/app/index.ts

@ ./src/main.browser.ts

ERROR in ./node_modules/angular2-logger/app/core/logger.ts

Module build failed: Error: /home/joel/workspace/Tracker3/node_modules/angular2-logger/app/core/logger.ts is not part of the compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

at AngularCompilerPlugin.getCompiledFile (/home/joel/workspace/Tracker3/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:643:23)

at plugin.done.then (/home/joel/workspace/Tracker3/node_modules/@ngtools/webpack/src/loader.js:467:39)

at <anonymous>

@ ./node_modules/angular2-logger/core.js 7:9-37

@ ./src/app/app.module.ts

@ ./src/app/index.ts

@ ./src/main.browser.ts

ERROR in ./node_modules/angular2-logger/app/core/providers.ts

Module build failed: Error: /home/joel/workspace/Tracker3/node_modules/angular2-logger/app/core/providers.ts is not part of the compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

at AngularCompilerPlugin.getCompiledFile (/home/joel/workspace/Tracker3/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:643:23)

at plugin.done.then (/home/joel/workspace/Tracker3/node_modules/@ngtools/webpack/src/loader.js:467:39)

at <anonymous>

@ ./node_modules/angular2-logger/core.js 8:9-40

@ ./src/app/app.module.ts

@ ./src/app/index.ts

@ ./src/main.browser.ts

ERROR in ./node_modules/ng-socket-io/socket-io.module.ts

Module build failed: Error: /home/joel/workspace/Tracker3/node_modules/ng-socket-io/socket-io.module.ts is not part of the compilation output. Please check the other error messages for details.

at AngularCompilerPlugin.getCompiledFile (/home/joel/workspace/Tracker3/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:648:23)

at plugin.done.then (/home/joel/workspace/Tracker3/node_modules/@ngtools/webpack/src/loader.js:467:39)

at <anonymous>

at process._tickCallback (internal/process/next_tick.js:188:7)

@ ./node_modules/ng-socket-io/index.js 3:25-54

@ ./src/app/app.module.ts

@ ./src/app/index.ts

@ ./src/main.browser.ts

ERROR in ./node_modules/ng-socket-io/socket-io.service.ts

Module build failed: Error: /home/joel/workspace/Tracker3/node_modules/ng-socket-io/socket-io.service.ts is not part of the compilation output. Please check the other error messages for details.

at AngularCompilerPlugin.getCompiledFile (/home/joel/workspace/Tracker3/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:648:23)

at plugin.done.then (/home/joel/workspace/Tracker3/node_modules/@ngtools/webpack/src/loader.js:467:39)

at <anonymous>

at process._tickCallback (internal/process/next_tick.js:188:7)

@ ./node_modules/ng-socket-io/index.js 5:26-56

@ ./src/app/app.module.ts

@ ./src/app/index.ts

@ ./src/main.browser.ts

ERROR in ./node_modules/font-awesome-webpack/node_modules/css-loader!./node_modules/less-loader!./node_modules/font-awesome-webpack/font-awesome-styles.loader.js!./node_modules/font-awesome-webpack/font-awesome.config.js

Module build failed: Error: Cannot find module 'less'

at Function.Module._resolveFilename (module.js:536:15)

at Function.Module._load (module.js:466:25)

at Module.require (module.js:579:17)

at require (internal/module.js:11:18)

at Object.<anonymous> (/home/joel/workspace/Tracker3/node_modules/less-loader/index.js:8:12)

at Module._compile (module.js:635:30)

at Object.Module._extensions..js (module.js:646:10)

at Module.load (module.js:554:32)

at tryModuleLoad (module.js:497:12)

at Function.Module._load (module.js:489:3)

at Module.require (module.js:579:17)

at require (internal/module.js:11:18)

at loadLoader (/home/joel/workspace/Tracker3/node_modules/loader-runner/lib/loadLoader.js:13:17)

at iteratePitchingLoaders (/home/joel/workspace/Tracker3/node_modules/loader-runner/lib/LoaderRunner.js:169:2)

at iteratePitchingLoaders (/home/joel/workspace/Tracker3/node_modules/loader-runner/lib/LoaderRunner.js:165:10)

at /home/joel/workspace/Tracker3/node_modules/loader-runner/lib/LoaderRunner.js:173:18

at loadLoader (/home/joel/workspace/Tracker3/node_modules/loader-runner/lib/loadLoader.js:36:3)

at iteratePitchingLoaders (/home/joel/workspace/Tracker3/node_modules/loader-runner/lib/LoaderRunner.js:169:2)

at runLoaders (/home/joel/workspace/Tracker3/node_modules/loader-runner/lib/LoaderRunner.js:362:2)

at NormalModule.doBuild (/home/joel/workspace/Tracker3/node_modules/webpack/lib/NormalModule.js:182:3)

at NormalModule.build (/home/joel/workspace/Tracker3/node_modules/webpack/lib/NormalModule.js:275:15)

at Compilation.buildModule (/home/joel/workspace/Tracker3/node_modules/webpack/lib/Compilation.js:151:10)

at factoryCallback (/home/joel/workspace/Tracker3/node_modules/webpack/lib/Compilation.js:344:12)

at factory (/home/joel/workspace/Tracker3/node_modules/webpack/lib/NormalModuleFactory.js:241:5)

at applyPluginsAsyncWaterfall (/home/joel/workspace/Tracker3/node_modules/webpack/lib/NormalModuleFactory.js:94:13)

at /home/joel/workspace/Tracker3/node_modules/tapable/lib/Tapable.js:268:11

at NormalModuleFactory.params.normalModuleFactory.plugin (/home/joel/workspace/Tracker3/node_modules/webpack/lib/CompatibilityPlugin.js:52:5)

at NormalModuleFactory.applyPluginsAsyncWaterfall (/home/joel/workspace/Tracker3/node_modules/tapable/lib/Tapable.js:272:13)

at resolver (/home/joel/workspace/Tracker3/node_modules/webpack/lib/NormalModuleFactory.js:69:10)

at process.nextTick (/home/joel/workspace/Tracker3/node_modules/webpack/lib/NormalModuleFactory.js:194:7)

@ ./node_modules/font-awesome-webpack/node_modules/style-loader!./node_modules/font-awesome-webpack/node_modules/css-loader!./node_modules/less-loader!./node_modules/font-awesome-webpack/font-awesome-styles.loader.js!./node_modules/font-awesome-webpack/font-awesome.config.js 4:14-142

@ ./node_modules/font-awesome-webpack/index.js

@ ./src/app/app.module.ts

@ ./src/app/index.ts

@ ./src/main.browser.ts

ERROR in ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./src/app/tracker/west/listHeader/listHeader.component.scss

Module not found: Error: Can't resolve '../../../../../node_modules/ng2-dnd/style.css' in '/home/joel/workspace/Tracker3/src/app/tracker/west/listHeader'

@ ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./src/app/tracker/west/listHeader/listHeader.component.scss 3:10-116

@ ./src/app/tracker/west/listHeader/listHeader.component.scss

@ ./src/app/tracker/west/listHeader/listHeader.component.ts

@ ./src/app/tracker/west/listHeader/index.ts

@ ./src/app/tracker/west/index.ts

@ ./src/app/tracker/index.ts

@ ./src/app/app.module.ts

@ ./src/app/index.ts

@ ./src/main.browser.ts

Child html-webpack-plugin for "index.html":

1 asset

[./node_modules/html-webpack-plugin/lib/loader.js!./src/index.html] ./node_modules/html-webpack-plugin/lib/loader.js!./src/index.html 2.29 kB {0} [built]

factory:3684ms building:17ms = 3701ms

[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 509 bytes {0} [built]

[] -> factory:10ms building:6ms = 16ms

[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 517 bytes {0} [built]

[] -> factory:11ms building:5ms = 16ms

+ 1 hidden module

看来,这些错误的来源:

node_modules/angular2-color-picker/lib/index.ts 

node_modules/angular2-logger/app/core/level.ts

node_modules/angular2-logger/app/core/logger.ts

node_modules/angular2-logger/app/core/providers.ts

node_modules/ng-socket-io/socket-io.module.ts

node_modules/ng-socket-io/socket-io.service.ts

不知何故没有被包括在内,但这不可能是正确的,因为当我直接包含它们时 - 没有任何改进。那么我做错了什么?如何正确设置这几个节点包的构建?为什么所有其他包装工作正常?或者我怎样才能学会如何解决这个问题?

我已经包括了我认为是相关配置文件的位置: 第一:webpack.dev.ts:

/** 

* @author: @AngularClass

*/

const helpers = require('./helpers');

const buildUtils = require('./build-utils');

const webpackMerge = require('webpack-merge'); // used to merge webpack configs

const commonConfig = require('./webpack.common.js'); // the settings that are common to prod and dev

const fs = require('fs');

/**

* Webpack Plugins

*/

const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin');

const NamedModulesPlugin = require('webpack/lib/NamedModulesPlugin');

const EvalSourceMapDevToolPlugin = require('webpack/lib/EvalSourceMapDevToolPlugin');

/**

* Webpack configuration

*

* See: http://webpack.github.io/docs/configuration.html#cli

*/

module.exports = function (options) {

const ENV = process.env.ENV = process.env.NODE_ENV = 'development';

const HOST = process.env.HOST || 'localhost';

const PORT = process.env.PORT || 3000;

const METADATA = Object.assign({}, buildUtils.DEFAULT_METADATA, {

host: HOST,

port: PORT,

ENV: ENV,

HMR: helpers.hasProcessFlag('hot'),

PUBLIC: process.env.PUBLIC_DEV || HOST + ':' + PORT

});

return webpackMerge(commonConfig({ env: ENV, metadata: METADATA }), {

/**

* Options affecting the output of the compilation.

*

* See: http://webpack.github.io/docs/configuration.html#output

*/

output: {

/**

* The output directory as absolute path (required).

*

* See: http://webpack.github.io/docs/configuration.html#output-path

*/

path: helpers.root('dist'),

/**

* Specifies the name of each output file on disk.

* IMPORTANT: You must not specify an absolute path here!

*

* See: http://webpack.github.io/docs/configuration.html#output-filename

*/

filename: '[name].bundle.js',

/**

* The filename of the SourceMaps for the JavaScript files.

* They are inside the output.path directory.

*

* See: http://webpack.github.io/docs/configuration.html#output-sourcemapfilename

*/

sourceMapFilename: '[file].map',

/** The filename of non-entry chunks as relative path

* inside the output.path directory.

*

* See: http://webpack.github.io/docs/configuration.html#output-chunkfilename

*/

chunkFilename: '[id].chunk.js',

library: 'ac_[name]',

libraryTarget: 'var',

},

module: {

rules: [

/**

* Css loader support for *.css files (styles directory only)

* Loads external css styles into the DOM, supports HMR

*

*/

{

test: /\.css$/,

use: ['style-loader', 'css-loader'],

include: [helpers.root('src', 'styles')]

},

/**

* Sass loader support for *.scss files (styles directory only)

* Loads external sass styles into the DOM, supports HMR

*

*/

{

test: /\.scss$/,

use: ['style-loader', 'css-loader', 'sass-loader'],

include: [helpers.root('src', 'styles')]

},

]

},

plugins: [

new EvalSourceMapDevToolPlugin({

moduleFilenameTemplate: '[resource-path]',

sourceRoot: 'webpack:///'

}),

/**

* Plugin: NamedModulesPlugin (experimental)

* Description: Uses file names as module name.

*

* See: https://github.com/webpack/webpack/commit/a04ffb928365b19feb75087c63f13cadfc08e1eb

*/

new NamedModulesPlugin(),

/**

* Plugin LoaderOptionsPlugin (experimental)

*

* See: https://gist.github.com/sokra/27b24881210b56bbaff7

*/

new LoaderOptionsPlugin({

debug: true,

options: { }

}),

// TODO: HMR

],

/**

* Webpack Development Server configuration

* Description: The webpack-dev-server is a little node.js Express server.

* The server emits information about the compilation state to the client,

* which reacts to those events.

*

* See: https://webpack.github.io/docs/webpack-dev-server.html

*/

devServer: {

port: METADATA.port,

host: METADATA.host,

hot: METADATA.HMR,

public: METADATA.PUBLIC,

historyApiFallback: true,

https: {

key: fs.readFileSync('/etc/apache2/certwork/newDragon.key'),

cert: fs.readFileSync('/etc/apache2/certwork/STAR_dynazu_com.crt'),

ca: fs.readFileSync('/etc/apache2/certwork/ssl-bundle.crt')

},

watchOptions: {

// if you're using Docker you may need this

// aggregateTimeout: 300,

// poll: 1000,

ignored: /node_modules/

},

/**

* Here you can access the Express app object and add your own custom middleware to it.

*

* See: https://webpack.github.io/docs/webpack-dev-server.html

*/

setup: function(app) {

// For example, to define custom handlers for some paths:

// app.get('/some/path', function(req, res) {

// res.json({ custom: 'response' });

// });

}

},

/**

* Include polyfills or mocks for various node stuff

* Description: Node configuration

*

* See: https://webpack.github.io/docs/configuration.html#node

*/

node: {

global: true,

crypto: 'empty',

process: true,

module: false,

clearImmediate: false,

setImmediate: false

}

});

}

情节复杂:在试图进一步挖掘,我做了一个“新公共管理运行生成:prod',它以不同的方式失败:

  57% building modules 396/442 modules 46 active ...odules/rxjs/operators/windowToggle.jsModuleNotFoundError: Module not found: Error: Can't resolve '../../../../../node_modules/ng2-dnd/style.css' in '/home/joel/workspace/Tracker3/src/app/tracker/west/listHeader' 

at factoryCallback (/home/joel/workspace/Tracker3/node_modules/webpack/lib/Compilation.js:276:40)

at factory (/home/joel/workspace/Tracker3/node_modules/webpack/lib/NormalModuleFactory.js:235:20)

at resolver (/home/joel/workspace/Tracker3/node_modules/webpack/lib/NormalModuleFactory.js:60:20)

at asyncLib.parallel (/home/joel/workspace/Tracker3/node_modules/webpack/lib/NormalModuleFactory.js:127:20)

at /home/joel/workspace/Tracker3/node_modules/async/dist/async.js:3874:9

at /home/joel/workspace/Tracker3/node_modules/async/dist/async.js:473:16

at iteratorCallback (/home/joel/workspace/Tracker3/node_modules/async/dist/async.js:1048:13)

at /home/joel/workspace/Tracker3/node_modules/async/dist/async.js:958:16

at /home/joel/workspace/Tracker3/node_modules/async/dist/async.js:3871:13

at resolvers.normal.resolve (/home/joel/workspace/Tracker3/node_modules/webpack/lib/NormalModuleFactory.js:119:22)

at onError (/home/joel/workspace/Tracker3/node_modules/enhanced-resolve/lib/Resolver.js:65:10)

at loggingCallbackWrapper (/home/joel/workspace/Tracker3/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)

at runAfter (/home/joel/workspace/Tracker3/node_modules/enhanced-resolve/lib/Resolver.js:158:4)

at innerCallback (/home/joel/workspace/Tracker3/node_modules/enhanced-resolve/lib/Resolver.js:146:3)

at loggingCallbackWrapper (/home/joel/workspace/Tracker3/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)

at next (/home/joel/workspace/Tracker3/node_modules/tapable/lib/Tapable.js:252:11)

at /home/joel/workspace/Tracker3/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:40:4

at loggingCallbackWrapper (/home/joel/workspace/Tracker3/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)

at runAfter (/home/joel/workspace/Tracker3/node_modules/enhanced-resolve/lib/Resolver.js:158:4)

at innerCallback (/home/joel/workspace/Tracker3/node_modules/enhanced-resolve/lib/Resolver.js:146:3)

at loggingCallbackWrapper (/home/joel/workspace/Tracker3/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)

at next (/home/joel/workspace/Tracker3/node_modules/tapable/lib/Tapable.js:252:11)

at innerCallback (/home/joel/workspace/Tracker3/node_modules/enhanced-resolve/lib/Resolver.js:144:11)

at loggingCallbackWrapper (/home/joel/workspace/Tracker3/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)

at next (/home/joel/workspace/Tracker3/node_modules/tapable/lib/Tapable.js:249:35)

at resolver.doResolve.createInnerCallback (/home/joel/workspace/Tracker3/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:44:6)

at loggingCallbackWrapper (/home/joel/workspace/Tracker3/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)

at afterInnerCallback (/home/joel/workspace/Tracker3/node_modules/enhanced-resolve/lib/Resolver.js:168:10)

at loggingCallbackWrapper (/home/joel/workspace/Tracker3/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)

at next (/home/joel/workspace/Tracker3/node_modules/tapable/lib/Tapable.js:252:11)

resolve '../../../../../node_modules/ng2-dnd/style.css' in '/home/joel/workspace/Tracker3/src/app/tracker/west/listHeader'

using description file: /home/joel/workspace/Tracker3/package.json (relative path: ./src/app/tracker/west/listHeader)

Field 'browser' doesn't contain a valid alias configuration

after using description file: /home/joel/workspace/Tracker3/package.json (relative path: ./src/app/tracker/west/listHeader)

using description file: /home/joel/workspace/Tracker3/node_modules/ng2-dnd/package.json (relative path: ./style.css)

no extension

Field 'browser' doesn't contain a valid alias configuration

/home/joel/workspace/Tracker3/node_modules/ng2-dnd/style.css doesn't exist

.ts

Field 'browser' doesn't contain a valid alias configuration

/home/joel/workspace/Tracker3/node_modules/ng2-dnd/style.css.ts doesn't exist

.js

Field 'browser' doesn't contain a valid alias configuration

/home/joel/workspace/Tracker3/node_modules/ng2-dnd/style.css.js doesn't exist

.json

Field 'browser' doesn't contain a valid alias configuration

/home/joel/workspace/Tracker3/node_modules/ng2-dnd/style.css.json doesn't exist

as directory

/home/joel/workspace/Tracker3/node_modules/ng2-dnd/style.css doesn't exist

那么也许这两个问题有关?如果您有任何见解,谢谢!

回答:

事实证明,这些问题都连接到需要的变化进行更新的WebPack建立了角5

而且包,我在路径需要是SCSS文件有一个@include由于ng2-dnd软件包的改变而改变。

对于ng-socket-io,我停止使用这个包,并抓取了一些代码,并将其直接插入到我的一个类中。

在这一点上,我只能从angular2-color-picker软件包中找到一个错误,该软件包在一年内还没有被维护。所以我切换到了ngx-color-picker软件包,现在所有软件都可以使用!

感谢所有看过这个问题的人,希望这个答案能够帮助别人。

以上是 如何解决与Angular5的webpack构建错误,我看到... node_modules/xxxx不是编译输出的一部分 的全部内容, 来源链接: utcz.com/qa/257878.html

回到顶部