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

yarn安装依赖,无法启动项目 #99

Closed
daqi opened this issue Apr 16, 2019 · 2 comments
Closed

yarn安装依赖,无法启动项目 #99

daqi opened this issue Apr 16, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@daqi
Copy link

daqi commented Apr 16, 2019

npm run dev:spa,报错

> [email protected] dev:spa /work/ux-xxxxxxxxxxxxxx-web2
> koot-dev --type spa

env: node\r: No such file or directory
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] dev:spa: `koot-dev --type spa`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] dev:spa 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!     /Users/qiyunjiang/.npm/_logs/2019-04-16T03_10_04_664Z-debug.log

log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/11.13.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run',
1 verbose cli   'dev:spa' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev:spa', 'dev:spa', 'postdev:spa' ]
5 info lifecycle [email protected]~predev:spa: [email protected]
6 info lifecycle [email protected]~dev:spa: [email protected]
7 verbose lifecycle [email protected]~dev:spa: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~dev:spa: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/work/ux-xxxxxxxxxxxxxx-web2/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle [email protected]~dev:spa: CWD: /work/ux-xxxxxxxxxxxxxx-web2
10 silly lifecycle [email protected]~dev:spa: Args: [ '-c', 'koot-dev --type spa' ]
11 info lifecycle [email protected]~dev:spa: Failed to exec dev:spa script
12 verbose stack Error: [email protected] dev:spa: `koot-dev --type spa`
12 verbose stack spawn ENOENT
12 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack     at ChildProcess.emit (events.js:193:13)
12 verbose stack     at maybeClose (internal/child_process.js:1001:16)
12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:266:5)
13 verbose pkgid [email protected]
14 verbose cwd /work/ux-xxxxxxxxxxxxxx-web2
15 verbose Darwin 18.0.0
16 verbose argv "/usr/local/Cellar/node/11.13.0/bin/node" "/usr/local/bin/npm" "run" "dev:spa"
17 verbose node v11.13.0
18 verbose npm  v6.7.0
19 error file sh
20 error code ELIFECYCLE
21 error errno ENOENT
22 error syscall spawn
23 error [email protected] dev:spa: `koot-dev --type spa`
23 error spawn ENOENT
24 error Failed at the [email protected] dev:spa script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]
@Diablohu Diablohu added the bug Something isn't working label Apr 16, 2019
@daqi
Copy link
Author

daqi commented Apr 16, 2019

Diablohu added a commit that referenced this issue Apr 18, 2019
Diablohu added a commit that referenced this issue Apr 18, 2019
@Diablohu
Copy link
Member

解决方案:在 publish 前,检查所有子包的 package.jsonbin 项,将指向的所有文件的换行符转为 LF,并进行一次 git commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants