Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Npm run ERR #994

Closed
fpeduu opened this issue Mar 9, 2020 · 10 comments
Closed

Npm run ERR #994

fpeduu opened this issue Mar 9, 2020 · 10 comments

Comments

@fpeduu
Copy link

fpeduu commented Mar 9, 2020

OS: Win10
I did install vuecli and start a simple model project called fpedu at my desktop.
I followed the instrutions and used npm install at project's folder.
I did fix automatically some vunerabilities found at installation.
I was tryna run 'npm run dev' and I got an error
Full log:
0 info it worked if it ends with ok
1 verbose cli [
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 'dev'
1 verbose cli ]
2 info using npm@6.13.4
3 info using node@v12.16.1
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle fpedu@1.0.0predev: fpedu@1.0.0
6 info lifecycle fpedu@1.0.0
dev: fpedu@1.0.0
7 verbose lifecycle fpedu@1.0.0dev: unsafe-perm in lifecycle true
8 verbose lifecycle fpedu@1.0.0
dev: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\filip\Desktop\fpedu\node_modules.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\nodejs;C:\Users\filip\AppData\Local\Microsoft\WindowsApps;C:\Users\filip\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\filip\AppData\Local\Continuum\anaconda3;C:\Users\filip\AppData\Local\Continuum\anaconda3\Scripts;C:\Users\filip\AppData\Roaming\npm
9 verbose lifecycle fpedu@1.0.0dev: CWD: C:\Users\filip\Desktop\fpedu
10 silly lifecycle fpedu@1.0.0
dev: Args: [
10 silly lifecycle '/d /s /c',
10 silly lifecycle 'cross-env NODE_ENV=development webpack-dev-server --open --hot'
10 silly lifecycle ]
11 silly lifecycle fpedu@1.0.0dev: Returned: code: 1 signal: null
12 info lifecycle fpedu@1.0.0
dev: Failed to exec dev script
13 verbose stack Error: fpedu@1.0.0 dev: cross-env NODE_ENV=development webpack-dev-server --open --hot
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:311:20)
13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:311:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid fpedu@1.0.0
15 verbose cwd C:\Users\filip\Desktop\fpedu
16 verbose Windows_NT 10.0.16299
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "dev"
18 verbose node v12.16.1
19 verbose npm v6.13.4
20 error code ELIFECYCLE
21 error errno 1
22 error fpedu@1.0.0 dev: cross-env NODE_ENV=development webpack-dev-server --open --hot
22 error Exit status 1
23 error Failed at the fpedu@1.0.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@DanielRuf
Copy link

This is probably an issue with cross-env on Windows.

@fpeduu
Copy link
Author

fpeduu commented Mar 12, 2020

How do I fix that?

@DanielRuf
Copy link

What happens when you try node_modules/.bin/cross-env NODE_ENV=development webpack-dev-server --open --hot?

@fpeduu
Copy link
Author

fpeduu commented Mar 13, 2020

node_modules/.bin/cross-env : O arquivo C:\Users\filip\Desktop\fpedu\node_modules.bin\cross-env.ps1 não pode ser carregado porque a
execução de scripts foi desabilitada neste sistema. Para obter mais informações, consulte about_Execution_Policies em
https://go.microsoft.com/fwlink/?LinkID=135170.
No linha:1 caractere:1

  • node_modules/.bin/cross-env NODE_ENV=development webpack-dev-server - ...
  •   + CategoryInfo          : ErrodeSegurança: (:) [], PSSecurityException
      + FullyQualifiedErrorId : UnauthorizedAccess
    

@DanielRuf
Copy link

Can you provide this in english?

@fpeduu
Copy link
Author

fpeduu commented Mar 14, 2020

Sorry. I did put * after translated phrases/parts
There it means:
node_modules/.bin/cross-env : O arquivo C:\Users\filip\Desktop\fpedu\node_modules.bin\cross-env.ps1 could not be charged because running scripts was disabled in this system*. For more informations, see* about_Execution_Policies at
https://go.microsoft.com/fwlink/?LinkID=135170.
At line*:1 character*:1

node_modules/.bin/cross-env NODE_ENV=development webpack-dev-server - ...

  • CategoryInfo : SecurityError* (:) [], PSSecurityException
  • FullyQualifiedErrorId : UnauthorizedAccess

@DanielRuf
Copy link

PSSecurityException

Seems to be related to Powershell and the security settings of your system.
See https://stackoverflow.com/a/57675039/753676 for a possible solution.

@DanielRuf
Copy link

Or take a look at https://go.microsoft.com/fwlink/?LinkID=135170.

@fpeduu
Copy link
Author

fpeduu commented Mar 15, 2020

The stackoverflow solution did not work, I will try some other ExecPs

@fpeduu
Copy link
Author

fpeduu commented Mar 15, 2020

Tysm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants