Laravel混合错误和npm升级错误

时间:2017-06-20 14:24:37

标签: node.js laravel-5 npm

我正忙着在Windows 7上使用Laravel 5.4开发一个站点。

今天当我尝试运行npm run dev时,我遇到了这个错误: app.scss不会导出内容

我试图与我们的朋友谷歌找到一个解决方案,但是不能。

我的npm版本是:3.10.10,节点版本:6.10.2

我尝试按照以下链接升级npm:Upgrade NPM 我得到了错误,现在我甚至看不到我的npm版本。

升级过程和我得到的错误:

PS C:\> Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force

PS C:\> npm install -g npm-windows-upgrade

C:\Users\Sigal\AppData\Roaming\npm\npm-windows-upgrade -> C:\Users\Sigal\AppDa
grade\bin\npm-windows-upgrade.js
C:\Users\Sigal\AppData\Roaming\npm
`-- npm-windows-upgrade@4.0.1
  +-- babel-polyfill@6.23.0
  | +-- babel-runtime@6.23.0
  | +-- core-js@2.4.1
  | `-- regenerator-runtime@0.10.5
  +-- chalk@1.1.3
  | +-- ansi-styles@2.2.1
  | +-- escape-string-regexp@1.0.5
  | +-- has-ansi@2.0.0
  | | `-- ansi-regex@2.1.1
  | +-- strip-ansi@3.0.1
  | `-- supports-color@2.0.0
  +-- cli-spinner@0.2.6
  +-- commander@2.9.0
  | `-- graceful-readlink@1.0.1
  +-- debug@2.6.8
  | `-- ms@2.0.0
  +-- inquirer@3.0.6
  | +-- ansi-escapes@1.4.0
  | +-- cli-cursor@2.1.0
  | | `-- restore-cursor@2.0.0
  | |   +-- onetime@2.0.1
  | |   | `-- mimic-fn@1.1.0
  | |   `-- signal-exit@3.0.2
  | +-- cli-width@2.1.0
  | +-- external-editor@2.0.4
  | | +-- iconv-lite@0.4.18
  | | +-- jschardet@1.4.2
  | | `-- tmp@0.0.31
  | |   `-- os-tmpdir@1.0.2
  | +-- figures@2.0.0
  | +-- lodash@4.17.4
  | +-- mute-stream@0.0.7
  | +-- run-async@2.3.0
  | | `-- is-promise@2.1.0
  | +-- rx@4.1.0
  | +-- string-width@2.0.0
  | | `-- is-fullwidth-code-point@2.0.0
  | `-- through@2.3.8
  +-- prompt@1.0.0
  | +-- colors@1.1.2
  | +-- pkginfo@0.4.0
  | +-- read@1.0.7
  | +-- revalidator@0.1.8
  | +-- utile@0.3.0
  | | +-- async@0.9.2
  | | +-- deep-equal@0.2.2
  | | +-- i@0.3.5
  | | +-- mkdirp@0.5.1
  | | | `-- minimist@0.0.8
  | | +-- ncp@1.0.1
  | | `-- rimraf@2.6.1
  | |   `-- glob@7.1.2
  | |     +-- fs.realpath@1.0.0
  | |     +-- inflight@1.0.6
  | |     | `-- wrappy@1.0.2
  | |     +-- inherits@2.0.3
  | |     +-- minimatch@3.0.4
  | |     | `-- brace-expansion@1.1.8
  | |     |   +-- balanced-match@1.0.0
  | |     |   `-- concat-map@0.0.1
  | |     +-- once@1.4.0
  | |     `-- path-is-absolute@1.0.1
  | `-- winston@2.1.1
  |   +-- async@1.0.0
  |   +-- colors@1.0.3
  |   +-- cycle@1.0.3
  |   +-- eyes@0.1.8
  |   +-- isstream@0.1.2
  |   +-- pkginfo@0.3.1
  |   `-- stack-trace@0.0.10
  `-- regenerator-runtime-only@0.8.38
    +-- es6-symbol@2.0.1
    | +-- d@0.1.1
    | `-- es5-ext@0.10.23
    |   +-- es6-iterator@2.0.1
    |   | +-- d@1.0.0
    |   | `-- es6-symbol@3.1.1
    |   `-- es6-symbol@3.1.1
    |     `-- d@1.0.0
    `-- promise@6.1.0
      `-- asap@1.0.0

PS C:\> npm-windows-upgrade
npm-windows-upgrade v4.0.1
? Which version do you want to install? 5.0.3
Checked system for npm installation:
According to PowerShell: C:\Program Files\nodejs
According to npm:        C:\Users\Sigal\AppData\Roaming\npm
Decided that npm is installed in C:\Program Files\nodejs
Upgrading npm... \

Error: Could not determine npm version.
    at C:\Users\Sigal\AppData\Roaming\npm\node_modules\npm-windows-upgrade\lib
    at ChildProcess.exithandler (child_process.js:211:5)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:886:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

现在正在运行:npm -v我明白了:

module.js:471
    throw err;
    ^

Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.
js'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:393:7)
    at startup (bootstrap_node.js:150:9)
    at bootstrap_node.js:508:3
module.js:471
    throw err;
    ^

Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.
js'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:393:7)
    at startup (bootstrap_node.js:150:9)
    at bootstrap_node.js:508:3

有人可以帮忙吗?

0 个答案:

没有答案