Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Doesn't work on Windows if launched from a shell with lowercase drive letter #113

Closed
thedgbrt opened this issue Nov 13, 2016 · 1 comment

Comments

@thedgbrt
Copy link

thedgbrt commented Nov 13, 2016

Hey guys,
congrats for the work on storybook, it's blowing my mind and transforming the way I make apps for the better 😄 !

If I run npm run storybook from a shell starting with a lowercase drive letter : c:\Users\dagobert\dev\awesomeApp>, it warns me of conflicts between modules and then crashes with an error 500.

WARNING in C:/Users/dagobert/dev/awesomeApp/~/babel-runtime/~/core-js/library/modules/_to-index.js
There is another module with an equal name when case is ignored.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Rename module if multiple modules are expected or use equal casing if one module is expected.
[...hundreds of these]

Error: File C:\Users\dagobert\dev\awesomeApp\node_modules\react-native\packager\react-packager\src\Resolver\polyfills\prelude_dev.js not found in any of the roots
    at Fastfs._getAndAssertRoot (C:/Users/dagobert/dev/awesomeApp/node_modules/react-native/packager/react-packager/src/node-haste/fastfs.js:163:21)
    at Fastfs._getFile (C:/Users/dagobert/dev/awesomeApp/node_modules/react-native/packager/react-packager/src/node-haste/fastfs.js:173:25)
    at Fastfs.readFile (C:/Users/dagobert/dev/awesomeApp/node_modules/react-native/packager/react-packager/src/node-haste/fastfs.js:93:23)
    at Polyfill._read (C:/Users/dagobert/dev/awesomeApp/node_modules/react-native/packager/react-packager/src/node-haste/Module.js:120:40)
    at _cache.get (C:/Users/dagobert/dev/awesomeApp/node_modules/react-native/packager/react-packager/src/node-haste/Module.js:139:16)
    at Cache.get (C:/Users/dagobert/dev/awesomeApp/node_modules/react-native/packager/react-packager/src/node-haste/Cache/index.js:82:35)
    at Polyfill.read (C:/Users/dagobert/dev/awesomeApp/node_modules/react-native/packager/react-packager/src/node-haste/Module.js:134:24)
    at Bundler._toModuleTransport (C:/Users/dagobert/dev/awesomeApp/node_modules/react-native/packager/react-packager/src/Bundler/index.js:577:14)
    at module (C:/Users/dagobert/dev/awesomeApp/node_modules/react-native/packager/react-packager/src/Bundler/index.js:412:14)
    at Array.map (native)

It took me two hours to realize that when I'm launching the command from this location C:\Users\dagobert\dev\awesomeApp> instead, it works as intended.

The conflict comes from the uppercase / lowercase drive letter on windows, as both work for navigating in the terminal.

I did some digging and found these issues in other npm modules
webpack/webpack#2694

And this one that might be the solution (26 Sept by Allov)
webpack/webpack#2815 (comment)

It seems like it can be fixed by forcing the script to cd to the same directory(but starting with an uppercase letter) before running any other command.

If you let me know where the script happens I can try to fix it.

@ndelangen
Copy link
Contributor

Please open an issue over at the new repo if you're still experiencing this issue, thanks!

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

No branches or pull requests

2 participants