NPM运行脚本位置

时间:2019-11-28 21:08:17

标签: javascript php npm

我正在尝试在package.json中编写脚本代码以运行我的应用程序,但这给了我类似的错误。

showCloseButton

在将所有脚本都正常运行之前,我已经将模板安装到Smarty模板中

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Rade\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'default' ]
2 info using npm@6.9.0
3 info using node@v10.15.3
4 verbose run-script [ 'predefault', 'default', 'postdefault' ]
5 info lifecycle wieldy@1.0.0~predefault: wieldy@1.0.0
6 info lifecycle wieldy@1.0.0~default: wieldy@1.0.0
7 verbose lifecycle wieldy@1.0.0~default: unsafe-perm in lifecycle true
8 verbose lifecycle wieldy@1.0.0~default: PATH: C:\Users\Rade\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\xampp\htdocs\XISS\node_modules\.bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Docker\Docker\Resources\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\ComposerSetup\bin;C:\Program Files (x86)\Yarn\bin\;C:\Program Files\nodejs\;C:\xampp\php;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Python27;C:\Users\Rade\AppData\Local\Programs\Python\Python37-32\Scripts\;C:\Users\Rade\AppData\Local\Programs\Python\Python37-32\;C:\Users\Rade\AppData\Local\Microsoft\WindowsApps;C:\Users\Rade\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Rade\AppData\Roaming\Composer\vendor\bin;C:\Users\Rade\AppData\Local\Yarn\bin;C:\Users\Rade\AppData\Roaming\npm;python27;C:\Users\Rade\AppData\Local\GitHubDesktop\bin
9 verbose lifecycle wieldy@1.0.0~default: CWD: C:\xampp\htdocs\XISS
10 silly lifecycle wieldy@1.0.0~default: Args: [ '/d /s /c',
10 silly lifecycle   'sass --watch templates/default/assets/scss/main.scss:templates/default/assets/css/light-style-1.min.css --style compressed' ]
11 silly lifecycle wieldy@1.0.0~default: Returned: code: 1  signal: null
12 info lifecycle wieldy@1.0.0~default: Failed to exec default script
13 verbose stack Error: wieldy@1.0.0 default: `sass --watch templates/default/assets/scss/main.scss:templates/default/assets/css/light-style-1.min.css --style compressed`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\Rade\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:189:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\Rade\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:189:13)
13 verbose stack     at maybeClose (internal/child_process.js:970:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid wieldy@1.0.0
15 verbose cwd C:\xampp\htdocs\XISS
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Rade\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "default"
18 verbose node v10.15.3
19 verbose npm  v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error wieldy@1.0.0 default: `sass --watch templates/default/assets/scss/main.scss:templates/default/assets/css/light-style-1.min.css --style compressed`
22 error Exit status 1
23 error Failed at the wieldy@1.0.0 default script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

所以我将脚本更改为仅。

"scripts": {
    "default-watch-style-sass": "sass --watch default/assets/scss/main.scss:default/assets/css/light-style-1.min.css --style compressed",
    "horizontal-watch-style-sass": "sass --watch templates/default/assets/scss/main.scss:horizontal/assets/css/style.min.css --style compressed",
    "horizontal-dark-watch-style-sass": "sass --watch horizontal-dark/assets/scss/main.scss:horizontal-dark/assets/css/style.min.css --style compressed",
    "horizontal-inside-nav-watch-style-sass": "sass --watch horizontal-inside-nav/assets/scss/main.scss:horizontal-inside-nav/assets/css/style.min.css --style compressed",
    "horizontal-bottom-nav-watch-style-sass": "sass --watch horizontal-bottom-nav/assets/scss/main.scss:horizontal-bottom-nav/assets/css/style.min.css --style compressed",
    "horizontal-top-nav-watch-style-sass": "sass --watch horizontal-top-nav/assets/scss/main.scss:horizontal-top-nav/assets/css/style.min.css --style compressed",
    "back-office-watch-style-sass": "sass --watch back-office/assets/scss/main.scss:back-office/assets/css/style.min.css --style compressed",
    "back-office-mini-watch-style-sass": "sass --watch back-office-mini/assets/scss/main.scss:back-office-mini/assets/css/style.min.css --style compressed",
    "drawer-watch-style-sass": "sass --watch drawer/assets/scss/main.scss:drawer/assets/css/style.min.css --style compressed",
    "style-back-office": "npm-run-all --parallel back-office-watch-style-sass back-office-css-prefix",
    "style-back-office-mini": "npm-run-all --parallel back-office-mini-watch-style-sass back-office-mini-css-prefix",
    "style-drawer": "npm-run-all --parallel drawer-watch-style-sass drawer-css-prefix",
    "style-crm": "npm-run-all --parallel crm-watch-style-sass crm-css-prefix",
    "run-all": "npm-run-all --parallel style-default style-horizontal style-horizontal-dark style-horizontal-inside-nav style-intranet style-back-office style-back-office-mini style-drawer style-crm"
  }

我只需要更改位置,但是什么也没发生。 有什么想法吗?

0 个答案:

没有答案