Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 你的笔记不能使用网页包吗?_Angularjs_Angular_Webpack - Fatal编程技术网

Angularjs 你的笔记不能使用网页包吗?

Angularjs 你的笔记不能使用网页包吗?,angularjs,angular,webpack,Angularjs,Angular,Webpack,我们正在进行AngularJs 1.5.10版项目。现在我们想把它移到角度为5/6的版本 该应用程序早期是使用JHipster构建的,但现在我们已经删除了JHipster bower的所有依赖项都已移至package.json 现在,我们正在尝试使用webpack版本为4.26.1捆绑脚本 在project summernote版本中-summernote@0.8.1被使用了。但是现在,当我们试图运行Web包来创建捆绑的JS时,我们得到了以下错误: C:\MY_DRIVE\Projects\My

我们正在进行AngularJs 1.5.10版项目。现在我们想把它移到角度为5/6的版本

该应用程序早期是使用JHipster构建的,但现在我们已经删除了JHipster

bower的所有依赖项都已移至package.json

现在,我们正在尝试使用webpack版本为4.26.1捆绑脚本

在project summernote版本中-summernote@0.8.1被使用了。但是现在,当我们试图运行Web包来创建捆绑的JS时,我们得到了以下错误:

C:\MY_DRIVE\Projects\MyProject\AngularUpgrade>npm run build

> library-app@0.0.0 build C:\MY_DRIVE\Projects\MyProject\AngularUpgrade
> rimraf src/main/webapp/dist && webpack --mode development --bail --progress --profile

 70% building 66/72 modules 6 active ...de\node_modules\ng-file-upload\index.jsModuleNotFoundError: Module not found: Error: Can't resolve 'angular-summernote' in 'C:\MY_DRIVE\Projec
ts\MyProject\AngularUpgrade\src\main\webapp\app'
    at factory.create (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\webpack\lib\Compilation.js:821:10)
    at factory (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\webpack\lib\NormalModuleFactory.js:397:22)
    at resolver (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\webpack\lib\NormalModuleFactory.js:130:21)
    at asyncLib.parallel (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\webpack\lib\NormalModuleFactory.js:224:22)
    at C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\neo-async\async.js:2825:7
    at C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\neo-async\async.js:6886:13
    at normalResolver.resolve (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\webpack\lib\NormalModuleFactory.js:214:25)
    at doResolve (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\enhanced-resolve\lib\Resolver.js:184:12)
    at hook.callAsync (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\enhanced-resolve\lib\Resolver.js:238:5)
    at _fn0 (eval at create (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:15:1)
    at resolver.doResolve (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\enhanced-resolve\lib\UnsafeCachePlugin.js:37:5)
    at hook.callAsync (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\enhanced-resolve\lib\Resolver.js:238:5)
    at _fn0 (eval at create (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:15:1)
    at hook.callAsync (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\enhanced-resolve\lib\Resolver.js:238:5)
    at _fn0 (eval at create (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:12:1)
    at resolver.doResolve (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\enhanced-resolve\lib\DescriptionFilePlugin.js:42:38)
    at hook.callAsync (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\enhanced-resolve\lib\Resolver.js:238:5)
    at _fn42 (eval at create (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:390:1)
    at resolver.doResolve (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\enhanced-resolve\lib\ModuleKindPlugin.js:23:37)
    at hook.callAsync (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\enhanced-resolve\lib\Resolver.js:238:5)
    at _fn0 (eval at create (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:15:1)
    at hook.callAsync (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\enhanced-resolve\lib\Resolver.js:238:5)
    at _fn0 (eval at create (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:15:1)
    at args (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\enhanced-resolve\lib\forEachBail.js:30:14)
    at hook.callAsync (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\enhanced-resolve\lib\Resolver.js:238:5)
    at _fn0 (eval at create (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:15:1)
    at resolver.doResolve (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\enhanced-resolve\lib\UnsafeCachePlugin.js:37:5)
    at hook.callAsync (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\enhanced-resolve\lib\Resolver.js:238:5)
    at _fn0 (eval at create (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:15:1)
    at hook.callAsync (C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\enhanced-resolve\lib\Resolver.js:238:5)
resolve 'angular-summernote' in 'C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\src\main\webapp\app'
  Parsed request is a module
  using description file: C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\package.json (relative path: ./src/main/webapp/app)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\src\main\webapp\app\node_modules doesn't exist or is not a directory
      C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\src\main\webapp\node_modules doesn't exist or is not a directory
      C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\src\main\node_modules doesn't exist or is not a directory
      C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\src\node_modules doesn't exist or is not a directory
      C:\MY_DRIVE\Projects\MyProject\node_modules doesn't exist or is not a directory
      C:\MY_DRIVE\Projects\node_modules doesn't exist or is not a directory
      C:\MY_DRIVE\node_modules doesn't exist or is not a directory
      C:\node_modules doesn't exist or is not a directory
      looking for modules in C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules
        using description file: C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
          using description file: C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\angular-summernote\package.json (relative path: .)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\angular-summernote is not a file
            .webpack.js
              Field 'browser' doesn't contain a valid alias configuration
              C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\angular-summernote.webpack.js doesn't exist
            .web.js
              Field 'browser' doesn't contain a valid alias configuration
              C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\angular-summernote.web.js doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\angular-summernote.ts doesn't exist
            .tsx
              Field 'browser' doesn't contain a valid alias configuration
              C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\angular-summernote.tsx doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\angular-summernote.js doesn't exist
            as directory
              existing directory
                using path: C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\angular-summernote\index
                  using description file: C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\angular-summernote\package.json (relative path: ./index)
                    no extension
                      Field 'browser' doesn't contain a valid alias configuration
                      C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\angular-summernote\index doesn't exist
                    .webpack.js
                      Field 'browser' doesn't contain a valid alias configuration
                      C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\angular-summernote\index.webpack.js doesn't exist
                    .web.js
                      Field 'browser' doesn't contain a valid alias configuration
                      C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\angular-summernote\index.web.js doesn't exist
                    .ts
                      Field 'browser' doesn't contain a valid alias configuration
                      C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\angular-summernote\index.ts doesn't exist
                    .tsx
                      Field 'browser' doesn't contain a valid alias configuration
                      C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\angular-summernote\index.tsx doesn't exist
                    .js
                      Field 'browser' doesn't contain a valid alias configuration
                      C:\MY_DRIVE\Projects\MyProject\AngularUpgrade\node_modules\angular-summernote\index.js doesn't exist
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! library-app@0.0.0 build: `rimraf src/main/webapp/dist && webpack --mode development --bail --progress --profile`
npm ERR! Exit status 1
npm ERR!
我已经尝试了以下给出的解决方案:

但什么都没用

我如何解决这个问题

module.exports = {
    entry: "./src/main/webapp/app/app.main.ts",
    output: {
        path: __dirname + '/src/main/webapp/dist',
        filename: "bundle.js"
    },
    resolve: {            
        extensions: [".webpack.js", ".web.js", ".ts", ".tsx", ".js"],
        alias: {
            codemirror: './path/to/fake/codemirror'
        }
    },
       module: {
        rules: [
            {
                test: /\.tsx$/,
                use: [
                    {loader: 'ts-loader'},
                ]
            }
        ]
    }
};