简体   繁体   English

Webpack npm-debug.log文件问题

[英]Webpack npm-debug.log file issue

I have installed webpack for my project. 我已经为我的项目安装了webpack。 However, when I try to run a command to convert scss in to css i get an error that says "Please include the following file with any support request: C:\\wamp\\www\\chandco\\wp-content\\themes\\chandco\\npm-debug.log". 但是,当我尝试运行将scss转换为css的命令时,出现错误消息“请在支持请求中包含以下文件:C:\\ wamp \\ www \\ chandco \\ wp-content \\ themes \\ chandco \\ npm -debug.log”。

The thing is this file already exists so I;m confused where the problem is. 问题是该文件已经存在,所以我很困惑问题所在。

Any help will be appreciated. 任何帮助将不胜感激。

Thanks. 谢谢。

        npm-debug-log file
        ====================
        0 info it worked if it ends with ok
        1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
        1 verbose cli   'C:\\Program 
        Files\\nodejs\\node_modules\\npm\\bin\\npm-
        cli.js',
        1 verbose cli   'run',
        1 verbose cli   'watch' ]
        2 info using npm@3.10.10
        3 info using node@v6.11.2
        4 verbose run-script [ 'prewatch', 'watch', 'postwatch' ]
        5 info lifecycle chandco-group@1.0.0~prewatch: chandco-group@1.0.0
    6 silly lifecycle chandco-group@1.0.0~prewatch: no script for prewatch, continuing
    7 info lifecycle chandco-group@1.0.0~watch: chandco-group@1.0.0
    8 verbose lifecycle chandco-group@1.0.0~watch: unsafe-perm in lifecycle true
    9 verbose lifecycle chandco-group@1.0.0~watch: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\wamp\www\chandco\wp-content\themes\chandco\node_modules\.bin;C:\Program Files\Docker\Docker\Resources\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Git\cmd;C:\Program Files\PuTTY\;C:\Program Files\nodejs\;C:\Users\Raj.Chudasama\AppData\Local\Microsoft\WindowsApps;C:\Users\Raj.Chudasama\AppData\Local\atom\bin;C:\Users\Raj.Chudasama\AppData\Local\Microsoft\WindowsApps;C:\Users\Raj.Chudasama\AppData\Roaming\npm
    10 verbose lifecycle chandco-group@1.0.0~watch: CWD: C:\wamp\www\chandco\wp-content\themes\chandco
    11 silly lifecycle chandco-group@1.0.0~watch: Args: [ '/d /s /c', 'webpack --watch' ]
    12 silly lifecycle chandco-group@1.0.0~watch: Returned: code: 1  signal: null
    13 info lifecycle chandco-group@1.0.0~watch: Failed to exec watch script
    14 verbose stack Error: chandco-group@1.0.0 watch: `webpack --watch`
    14 verbose stack Exit status 1
    14 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
    14 verbose stack     at emitTwo (events.js:106:13)
    14 verbose stack     at EventEmitter.emit (events.js:191:7)
    14 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
    14 verbose stack     at emitTwo (events.js:106:13)
    14 verbose stack     at ChildProcess.emit (events.js:191:7)
    14 verbose stack     at maybeClose (internal/child_process.js:891:16)
    14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
    15 verbose pkgid chandco-group@1.0.0
    16 verbose cwd C:\wamp\www\chandco\wp-content\themes\chandco
    17 error Windows_NT 10.0.15063
    18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "watch"
    19 error node v6.11.2
    20 error npm  v3.10.10
    21 error code ELIFECYCLE
    22 error chandco-group@1.0.0 watch: `webpack --watch`
    22 error Exit status 1
    23 error Failed at the chandco-group@1.0.0 watch script 'webpack --watch'.
    23 error Make sure you have the latest version of node.js and npm installed.
    23 error If you do, this is most likely a problem with the chandco-group package,
    23 error not with npm itself.
    23 error Tell the author that this fails on your system:
    23 error     webpack --watch
    23 error You can get information on how to open an issue for this project with:
    23 error     npm bugs chandco-group
    23 error Or if that isn't available, you can get their info via:
    23 error     npm owner ls chandco-group
    23 error There is likely additional logging output above.
    24 verbose exit [ 1, true ]
    `

    package.json file
    ================

    `{
      "name": "chandco-group",
      "version": "1.0.0",
      "description": "",
      "main": "index.js",
      "scripts": {
        "watch": "webpack --watch"
      },
      "author": "Raj Chudasama",
      "license": "ISC",
      "devDependencies": {
        "css-loader": "^0.28.4",
        "extract-text-webpack-plugin": "^3.0.0",
        "node-sass": "^4.5.3",
        "sass-loader": "^6.0.6",
        "style-loader": "^0.18.2",
        "webpack": "^3.4.1",
        "webpack-dev-server": "^2.6.1"
      }
    }
    `

    webpack.confile file
    ====================
    `var webpack = require('webpack');
    var path = require('path');

    var config = {
      entry: './src/index.js',
      output: {
        path: path.resolve(__dirname, './public'),
        filename: 'output.js'
      },
      module: {
        rules: [
          {
            test: /\.scss$/,
            use: ExtractTextWebpackPlugin.extract({
              use:['css-loader', 'sass-loader'],
              fallback: 'style-loader'
            })
          }
        ]
      },
      plugins: [
        new ExtractTextWebpackPlugin('styles.css')
      ]
    }

    module.exports = config;
    `

我通过要求页面顶部的webpack文本提取插件来解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 npm install被大型package.json杀死,没有npm-debug.log - `npm install` killed for large package.json, no npm-debug.log 如何阅读npm-debug.log(对Node.JS App进行故障排除) - How to Read npm-debug.log (Troubleshoot Node.JS App) 使用webpack使用npm lib的问题 - Issue using npm lib with webpack Webpack:断点和打字稿中的映射问题-断点在调试时自动移至文件末尾 - Webpack: issue with breakpoints and mapping in typescript - breakpoints automatically moves at the end of file on debug 如何调试使用 webpack 编译的 npm 模块? - How can I debug an npm module compiled with webpack? Webpack不会在npm运行时生成包文件 - Webpack does not generate bundle file on npm run WebPack RegEx从$ log.debug之类的代码中删除项目 - WebPack RegEx Strip items from code like $log.debug 尝试从npm用&#39;log&#39;包登录到Node.js文件 - Trying to log to file on nodejs with 'log' package from npm Browser will not Launch on npm start with webpack 与 webpack-dev-middleware@3.7.2 和 webpack@^4.0.0 对等依赖问题相关? - Browser will not Launch on npm start with webpack Related to webpack-dev-middleware@3.7.2 and webpack@^4.0.0 Peer Dependency Issue? 如何从没有 npm/webpack 的 HTML 文件导入反应模块 - How to import react modules from an HTML file with no npm/webpack
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM