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

tsconfig could not be read on windows #14703

Closed
Jakob-em opened this issue Apr 23, 2021 · 3 comments
Closed

tsconfig could not be read on windows #14703

Jakob-em opened this issue Apr 23, 2021 · 3 comments

Comments

@Jakob-em
Copy link
Contributor

Jakob-em commented Apr 23, 2021

Describe the bug
It seems like the recent changes (#14358) to the angular configuration detection broke something on windows.
This makes the current prerelease version unusable on windows.
If I try to run storybook in a new angular project I get the following error:

info => Using angular project "storybook-test" for configuring Storybook
ERR! => Could not get angular cli webpack config
ERR! Error: Error: ENOENT: no such file or directory, lstat 'C:/C/work/storybook-test/tsconfig.app.json'
ERR!     at Object.lstatSync (fs.js:1077:3)
ERR!     at NodeJSFileSystem.NodeJSReadonlyFileSystem.lstat (C:\work\storybook-test\node_modules\@angular\compiler-cli\src\ngtsc\file_system\src\node_js_file_system.js:107:23)
ERR!     at calcProjectFileAndBasePath (C:\work\storybook-test\node_modules\@angular\compiler-cli\src\perform_compile.js:127:33)
ERR!     at Object.readConfiguration (C:\work\storybook-test\node_modules\@angular\compiler-cli\src\perform_compile.js:161:22)
ERR!     at Object.readTsconfig (C:\work\storybook-test\node_modules\@angular-devkit\build-angular\src\utils\read-tsconfig.js:26:29)
ERR!     at C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:155:67
ERR!     at step (C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:69:23)
ERR!     at Object.next (C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:50:53)
ERR!     at C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:44:71
ERR!     at new Promise (<anonymous>)
ERR!     at __awaiter (C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:40:12)
ERR!     at buildWebpackConfigOptions (C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:135:12)
ERR!     at Object.<anonymous> (C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:196:42)
ERR!     at step (C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:69:23)
ERR!     at Object.next (C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:50:53)
ERR!     at C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:44:71
ERR!
ERR!     at Object.readTsconfig (C:\work\storybook-test\node_modules\@angular-devkit\build-angular\src\utils\read-tsconfig.js:28:15)
ERR!     at C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:155:67
ERR!     at step (C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:69:23)
ERR!     at Object.next (C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:50:53)
ERR!     at C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:44:71
ERR!     at new Promise (<anonymous>)
ERR!     at __awaiter (C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:40:12)
ERR!     at buildWebpackConfigOptions (C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:135:12)
ERR!     at Object.<anonymous> (C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:196:42)
ERR!     at step (C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:69:23)
ERR!     at Object.next (C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:50:53)
ERR!     at C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:44:71
ERR!     at new Promise (<anonymous>)
ERR!     at __awaiter (C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:40:12)
ERR!     at Object.extractAngularCliWebpackConfig (C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\angular-devkit-build-webpack.js:190:12)
ERR!     at Object.<anonymous> (C:\work\storybook-test\node_modules\@storybook\angular\dist\ts3.9\server\framework-preset-angular-cli.js:106:73)

To Reproduce

ng new storybook-test
cd storybook-test
npx sb@next init
npm run storybook

System

Environment Info:

  System:
    OS: Windows 10
  Binaries:
    Node: 14.16.1
    Yarn: 1.22.4
    npm: 6.14.13
  npmPackages:
    @storybook/addon-actions: ^6.3.0-alpha.14 => 6.3.0-alpha.14
    @storybook/addon-essentials: ^6.3.0-alpha.14 => 6.3.0-alpha.14
    @storybook/addon-links: ^6.3.0-alpha.14 => 6.3.0-alpha.14
    @storybook/angular: ^6.3.0-alpha.14 => 6.3.0-alpha.14

Angular version: 11.2.11

Additional context
I am not 100% sure that this is related to windows, because I didn't have time to test it on mac/linux yet, but looking at the error (C:/C/work/storybook-test/tsconfig.app.json) it seems to be related to the file resolution on windows.

@clipvision
Copy link

I have the same problem too, I was testing the alpha version for the rendering on toolbar buttons click.

@shilman
Copy link
Member

shilman commented Apr 29, 2021

Yo-ho-ho!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.3.0-alpha.16 containing PR #14747 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Apr 29, 2021
@Jakob-em
Copy link
Contributor Author

I can confirm that it's working with v6.3.0-alpha.16. Thanks for the quick fix 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants