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

node4.3版本下,项目无法启动 #1

Open
wangshiyang3035884 opened this issue Apr 11, 2016 · 3 comments
Open

node4.3版本下,项目无法启动 #1

wangshiyang3035884 opened this issue Apr 11, 2016 · 3 comments

Comments

@wangshiyang3035884
Copy link

node4.3.0 npm 3.7.3 下unkoa下面的node_modules目录里没有es2015-node这个文件

@i5ting
Copy link
Contributor

i5ting commented Apr 11, 2016

收到

@wssgcg1213
Copy link
Member

@i5ting 我也发现这个问题

> [email protected] start /Users/Liuchenling/Sites/MagicMessage
> nodemon bin/run

[nodemon] 1.9.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node bin/run`
/Users/Liuchenling/Sites/MagicMessage/node_modules/babel-core/lib/transformation/file/options/option-manager.js:372
          throw new Error("Couldn't find preset " + JSON.stringify(val) + " relative to directory " + JSON.stringify(dirname));
          ^

Error: Couldn't find preset "/Users/Liuchenling/Sites/MagicMessage/node_modules/runkoa/node_modules/babel-preset-es2015-node5" relative to directory "/Users/Liuchenling/Sites/MagicMessage/bin"
    at /Users/Liuchenling/Sites/MagicMessage/node_modules/babel-core/lib/transformation/file/options/option-manager.js:372:17
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/Liuchenling/Sites/MagicMessage/node_modules/babel-core/lib/transformation/file/options/option-manager.js:364:20)
    at OptionManager.mergePresets (/Users/Liuchenling/Sites/MagicMessage/node_modules/babel-core/lib/transformation/file/options/option-manager.js:348:10)
    at OptionManager.mergeOptions (/Users/Liuchenling/Sites/MagicMessage/node_modules/babel-core/lib/transformation/file/options/option-manager.js:307:14)
    at OptionManager.init (/Users/Liuchenling/Sites/MagicMessage/node_modules/babel-core/lib/transformation/file/options/option-manager.js:465:10)
    at compile (/Users/Liuchenling/Sites/MagicMessage/node_modules/babel-register/lib/node.js:81:45)
    at loader (/Users/Liuchenling/Sites/MagicMessage/node_modules/babel-register/lib/node.js:126:14)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/Liuchenling/Sites/MagicMessage/node_modules/babel-register/lib/node.js:136:7)
    at Module.load (module.js:357:32)
[nodemon] app crashed - waiting for file changes before starting...

因为 npm3 扁平化了依赖, 所以直接查找
'node_modules/runkoa/node_modules/babel-preset-es2015-node5' 是会抛错的

wssgcg1213 added a commit to wssgcg1213/runkoa that referenced this issue Apr 11, 2016
@xinshouke
Copy link

I have met this issue on platform win10 and node v5.10.1, first, I new a issue to mgcrea... At last, I fix this issue as the above fix.

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

4 participants