npm run test - 生命周期中的不安全烫发 [英] npm run test - unsafe-perm in lifecycle

查看:59
本文介绍了npm run test - 生命周期中的不安全烫发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行良好的 Reac/Redux 应用程序,但是当我运行以下命令时

I have a Reac/Redux app that runs fine, however when I run the following command

npm 运行测试

我收到以下错误

6 info lifecycle MyApp@0.0.0~test: MyApp@0.0.0
7 verbose lifecycle MyApp@0.0.0~test: unsafe-perm in lifecycle true
8 verbose lifecycle MyApp@0.0.0~test: PATH: C:\....\...
9 verbose lifecycle MyApp@0.0.0~test: CWD: C:\projects\MyApp\MyApp\MyApp-web
10 silly lifecycle MyApp@0.0.0~test: Args: [ '/d /s /c', 'mocha --require src/testSetup.js "src/**/*.test.js*" ' ]
11 silly lifecycle MyApp@0.0.0~test: Returned: code: 1  signal: null
12 info lifecycle MyApp@0.0.0~test: Failed to exec test script
13 verbose stack Error: MyApp@0.0.0 test: `mocha --require src/testSetup.js "src/**/*.test.js*" `
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\....\NodeJs\12.1.0\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:196:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\....\NodeJs\12.1.0\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:196:13)
13 verbose stack     at maybeClose (internal/child_process.js:1000:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:267:5)

我不知道是什么导致了这个问题.知道如何解决此错误吗?

I don't know what is causing this issue. Any idea how I can resolve this error?

推荐答案

我希望这可以帮助你,我发现我的问题是我使用的 nodejs 版本.我决定安装 nvm(节点版本管理器)来切换"它.版本并降级到 11.13.0,终于成功了.

i hope this can help you, i found out my issue was the version of nodejs i was using. I decided to install nvm(Node Version Manager) to "switch" versions and downgraded to the 11.13.0, and it finally worked.

这篇关于npm run test - 生命周期中的不安全烫发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆