opentripplanner / otp-ui

React component library, which can be used to build trip planner webapps.
http://www.opentripplanner.org/otp-ui/?path=/story/transitvehicleoverlay--real-time-rectangles
MIT License
56 stars 34 forks source link

ERROR in ./packages/geocoder/lib/index.js #337

Open mpaine-act opened 2 years ago

mpaine-act commented 2 years ago

Steps to reproduce:

1) git clone https://github.com/opentripplanner/otp-ui.git 2) cd otp-ui 3) yarn dev

Note this is compiled on Windows 10 (if that matters).

WARNING in ./packages/printable-itinerary/node_modules/@opentripplanner/itinerary-body/src/stories/OtpRrItineraryBody.story.js 46:4 Module parse failed: Unexpected token (46:4) File was processed with these loaders: * ./node_modules/@storybook/source-loader/dist/cjs/index.js You may need an additional loader to handle the result of these loaders. | }) { | return ( > :15:1) at P:\github\otp-ui\node_modules\enhanced-resolve\lib\UnsafeCachePlugin.js:44:7 at P:\github\otp-ui\node_modules\enhanced-resolve\lib\Resolver.js:285:5 at eval (eval at create (P:\github\otp-ui\node_modules\tapable\lib\HookCodeFactory.js:33:10), :15:1) at P:\github\otp-ui\node_modules\enhanced-resolve\lib\Resolver.js:285:5 at eval (eval at create (P:\github\otp-ui\node_modules\tapable\lib\HookCodeFactory.js:33:10), :27:1) at P:\github\otp-ui\node_modules\enhanced-resolve\lib\DescriptionFilePlugin.js:67:43 resolve './geocoders/arcgis' in 'P:\github\otp-ui\packages\geocoder\lib' using description file: P:\github\otp-ui\packages\geocoder\package.json (relative path: ./lib) Field 'browser' doesn't contain a valid alias configuration using description file: P:\github\otp-ui\packages\geocoder\package.json (relative path: ./lib/geocoders/arcgis) no extension Field 'browser' doesn't contain a valid alias configuration P:\github\otp-ui\packages\geocoder\lib\geocoders\arcgis doesn't exist .mjs Field 'browser' doesn't contain a valid alias configuration P:\github\otp-ui\packages\geocoder\lib\geocoders\arcgis.mjs doesn't exist .js Field 'browser' doesn't contain a valid alias configuration P:\github\otp-ui\packages\geocoder\lib\geocoders\arcgis.js doesn't exist .jsx Field 'browser' doesn't contain a valid alias configuration P:\github\otp-ui\packages\geocoder\lib\geocoders\arcgis.jsx doesn't exist .ts Field 'browser' doesn't contain a valid alias configuration P:\github\otp-ui\packages\geocoder\lib\geocoders\arcgis.ts doesn't exist .tsx Field 'browser' doesn't contain a valid alias configuration P:\github\otp-ui\packages\geocoder\lib\geocoders\arcgis.tsx doesn't exist .json Field 'browser' doesn't contain a valid alias configuration P:\github\otp-ui\packages\geocoder\lib\geocoders\arcgis.json doesn't exist .cjs Field 'browser' doesn't contain a valid alias configuration P:\github\otp-ui\packages\geocoder\lib\geocoders\arcgis.cjs doesn't exist as directory P:\github\otp-ui\packages\geocoder\lib\geocoders\arcgis doesn't exist WARN Broken build, fix the error above. WARN You may need to refresh the browser. error Command failed with exit code 1.
miles-grant-ibigroup commented 2 years ago

Which version of node are you running?

mpaine-act commented 2 years ago

v16.13.1

miles-grant-ibigroup commented 2 years ago

Thanks for letting us know about this! We've identified this as a windows-only issue, so would recommend using WSL until we figure out what's going on

mpaine-act commented 2 years ago

thank you

mcleinman commented 2 years ago

When using WSL, make sure to be fully in WSL - Clone the repo into the Linux file system, don't have node (running via WSL) run the repo from the Windows file system. Errors will occur when running tests if you have the repo in the Windows file system.

grant-humphries commented 1 year ago

The workaround for this is to manually create the file that can't be found during the processes launched by yarn dev. An empty file at the below path allows the install and checks to complete and storybook to launch:

<otp-ui-root>/packages/geocoder/lib/geocoders/arcgis.js