0

我尝试使用 pnpm 但在 buildmachine 上出现此错误:

Error: Cannot find module 'less'
        at Function.Module._resolveFilename (module.js:339:15)
        at Function.require.resolve (internal/module.js:23:19)
        at resolve_engine_path (C:\BuildAgent\_work\Web\App\node_modules\.registry.npmjs.org\accord\0.26.4\node_modules\accord\lib\index.js:65:18) at Object.exports.load (C:\BuildAgent\_work\Web\App\node_modules\.registry.npmjs.org\accord\0.26.4\node_modules\accord\lib\index.js:25:19) at Object.<anonymous> (C:\BuildAgent\_work\Web\App\node_modules\.registry.npmjs.org\gulp-less\3.3.0\node_modules\gulp-less\index.js:9:29) at Module._compile (module.js:413:34)
            at Object.Module._extensions..js (module.js:422:10)
            at Module.load (module.js:357:32)
            at Function.Module._load (module.js:314:12)
            at Module.require (module.js:367:17)
            ##[error]Running build failed.
            ##[error]Error:
            ##[error]System.Exception: Failed to run gulp build-release

我试图解决这个错误,但不知道如何让 pnpm 安装模块。根据这个问题,这应该已经解决了: https ://github.com/pnpm/pnpm/issues/118

一些package.json:

"devDependencies": {
    "aurelia-bundler": "^0.3.2",
    "aurelia-tools": "^0.1.0",
    "babel-eslint": "^4.1.6",
    "del": "^1.1.0",
    "eslint": "^1.10.3",
    "eslint-plugin-aurelia": "^0.3.0",
    "gulp": "^3.8.10",
    "gulp-babel": "^5.1.0",
    "gulp-bump": "^0.1.11",
    "gulp-changed": "^1.1.0",
    "gulp-concat": "^2.5.2",
    "gulp-cssmin": "^0.1.7",
    "gulp-eslint": "^1.1.1",
    "gulp-jshint": "^1.9.0",
    "gulp-less": "^3.0.1",
    "gulp-plumber": "^0.6.6",
    "gulp-shell": "^0.4.0",
    "gulp-sourcemaps": "^1.3.0",
    "gulp-uglify": "^1.1.0",

有人遇到过这个问题并解决了吗?如果我错过了一些信息,请告诉我!

4

1 回答 1

-1

您可以npm install less在终端中运行

于 2018-08-06T02:52:31.447 回答