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 start 报错 #1

Open
Feiox opened this issue Dec 4, 2018 · 1 comment
Open

使用该模板生成后,npm start 报错 #1

Feiox opened this issue Dec 4, 2018 · 1 comment

Comments

@Feiox
Copy link

Feiox commented Dec 4, 2018

使用 sao tina my-app 建立项目后,npm start 报错:

npm ERR! code ELIFECYCLE
npm ERR! errno 255
npm ERR! my-app@0.0.1 clean: `rimraf './dist/!(app.json)**'`
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the my-app@0.0.1 clean script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Feiox\AppData\Roaming\npm-cache\_logs\2018-12-04T12_04_38_601Z-debug.log
ERROR: "clean" exited with 255.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-app@0.0.1 prestart: `run-s clean`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-app@0.0.1 prestart script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Feiox\AppData\Roaming\npm-cache\_logs\2018-12-04T12_04_38_650Z-debug.log

npm debug log 如下

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Feiox\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start' ]
2 info using npm@6.4.1
3 info using node@v8.12.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle my-app@0.0.1~prestart: my-app@0.0.1
6 verbose lifecycle my-app@0.0.1~prestart: unsafe-perm in lifecycle true
7 verbose lifecycle my-app@0.0.1~prestart: PATH: C:\Users\Feiox\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Feiox\Projects\my-app\node_modules\.bin;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files\Python\Python37\Scripts\;C:\Program Files\Python\Python37\;C:\Program Files\Microsoft MPI\Bin\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Users\Feiox\AppData\Local\Microsoft\WindowsApps;;C:\Users\Feiox\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\Bandizip\;C:\Users\Feiox\AppData\Roaming\npm
8 verbose lifecycle my-app@0.0.1~prestart: CWD: C:\Users\Feiox\Projects\my-app
9 silly lifecycle my-app@0.0.1~prestart: Args: [ '/d /s /c', 'run-s clean' ]
10 silly lifecycle my-app@0.0.1~prestart: Returned: code: 1  signal: null
11 info lifecycle my-app@0.0.1~prestart: Failed to exec prestart script
12 verbose stack Error: my-app@0.0.1 prestart: `run-s clean`
12 verbose stack Exit status 1
12 verbose stack     at EventEmitter.<anonymous> (C:\Users\Feiox\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
12 verbose stack     at emitTwo (events.js:126:13)
12 verbose stack     at EventEmitter.emit (events.js:214:7)
12 verbose stack     at ChildProcess.<anonymous> (C:\Users\Feiox\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
12 verbose stack     at emitTwo (events.js:126:13)
12 verbose stack     at ChildProcess.emit (events.js:214:7)
12 verbose stack     at maybeClose (internal/child_process.js:915:16)
12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
13 verbose pkgid my-app@0.0.1
14 verbose cwd C:\Users\Feiox\Projects\my-app
15 verbose Windows_NT 10.0.17763
16 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Feiox\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
17 verbose node v8.12.0
18 verbose npm  v6.4.1
19 error code ELIFECYCLE
20 error errno 1
21 error my-app@0.0.1 prestart: `run-s clean`
21 error Exit status 1
22 error Failed at the my-app@0.0.1 prestart script.
22 error This is probably not a problem with npm. There is likely additional logging output above.
23 verbose exit [ 1, true ]
imyelo added a commit that referenced this issue Dec 4, 2018
@imyelo
Copy link
Member

imyelo commented Dec 4, 2018

应该是因为在命令行里用了 ' 作引号,所以导致在 windows 环境里异常。

刚改成 " 发了 2.0.3 版本,请试下有没有修正这个问题:

sao tina -u {dirname}

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