Replies: 1 comment
-
From just that information, I can't really tell what the problem is. If you could provide a reproduction, that would be best. If not, the upgrade commands that you used, may help. If you can't get it to happen in a new project then I would expect it to be a dependency problem, which my suggestion below may fix. One thing you may want to do is delete your The line Storybook 8 should still support Angular 15+. So, even if it upgrades to latest, it should still work. I haven't checked the Storybook cli, in a while, but I don't think it is able to install a specific version, unless I missed that being added. |
Beta Was this translation helpful? Give feedback.
-
Summary
Hey,
I have angular v14 that worked well with story book, here is relevant config in package.json:
"dependencies": {
"@angular/animations": "^14.3.0",
"@angular/cdk": "^14.2.7",
"@angular/common": "^14.3.0",
"@angular/compiler": "^14.3.0",
"@angular/core": "^14.3.0",
"@angular/forms": "^14.3.0",
"@angular/material": "^14.2.7",
"@angular/platform-browser": "^14.3.0",
"@angular/platform-browser-dynamic": "^14.3.0",
"@angular/router": "^14.3.0",
"rxjs": "^6.5.4",
"tslib": "^2.0.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.2.11",
"@angular-eslint/builder": "14.4.0",
"@angular-eslint/eslint-plugin": "14.4.0",
"@angular-eslint/eslint-plugin-template": "14.4.0",
"@angular-eslint/schematics": "14.4.0",
"@angular-eslint/template-parser": "14.4.0",
"@angular/cli": "14.2.11",
"@angular/compiler-cli": "^14.3.0",
"@storybook/addon-actions": "^6.4.20",
"@storybook/addon-essentials": "^6.4.20",
"@storybook/addon-interactions": "^6.4.20",
"@storybook/addon-links": "^6.4.20",
"@storybook/angular": "^6.4.20",
"@storybook/builder-webpack5": "^6.4.20",
"@storybook/manager-webpack5": "^6.4.20",
"@storybook/testing-library": "0.0.9",
"typescript": "4.7.4"
},
Now I upgraded to angular 16 without upgrading storybook and got this error:
Failed to load preset: {"type":"presets","name":"/Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/angular/dist/ts3.9/server/framework-preset-angular-cli.js"} on level 2
ERR! Error: Cannot find module '@angular-devkit/build-angular/src/webpack/configs'
ERR! Require stack:
ERR! - /Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/angular/dist/ts3.9/server/angular-cli-webpack-12.2.x.js
ERR! - /Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/angular/dist/ts3.9/server/framework-preset-angular-cli.js
ERR! - /Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/core-common/dist/cjs/presets.js
ERR! - /Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/core-common/dist/cjs/index.js
ERR! - /Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/core-server/dist/cjs/index.js
ERR! - /Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/core/dist/cjs/server.js
ERR! - /Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/core/server.js
ERR! - /Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/angular/dist/ts3.9/server/index.js
ERR! - /Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/angular/bin/index.js
ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
ERR! at Function.Module._load (node:internal/modules/cjs/loader:778:27)
ERR! at Module.require (node:internal/modules/cjs/loader:1005:19)
ERR! at require (node:internal/modules/cjs/helpers:102:18)
ERR! at Object. (/Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/angular/dist/ts3.9/server/angular-cli-webpack-12.2.x.js:12:68)
ERR! at Module._compile (node:internal/modules/cjs/loader:1103:14)
ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
ERR! at Module.load (node:internal/modules/cjs/loader:981:32)
ERR! at Function.Module._load (node:internal/modules/cjs/loader:822:12)
ERR! at Module.require (node:internal/modules/cjs/loader:1005:19)
ERR! Error: Cannot find module '@angular-devkit/build-angular/src/webpack/configs'
ERR! Require stack:
ERR! - /Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/angular/dist/ts3.9/server/angular-cli-webpack-12.2.x.js
ERR! - /Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/angular/dist/ts3.9/server/framework-preset-angular-cli.js
ERR! - /Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/core-common/dist/cjs/presets.js
ERR! - /Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/core-common/dist/cjs/index.js
ERR! - /Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/core-server/dist/cjs/index.js
ERR! - /Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/core/dist/cjs/server.js
ERR! - /Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/core/server.js
ERR! - /Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/angular/dist/ts3.9/server/index.js
ERR! - /Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/angular/bin/index.js
ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
ERR! at Function.Module._load (node:internal/modules/cjs/loader:778:27)
ERR! at Module.require (node:internal/modules/cjs/loader:1005:19)
ERR! at require (node:internal/modules/cjs/helpers:102:18)
ERR! at Object. (/Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/angular/dist/ts3.9/server/angular-cli-webpack-12.2.x.js:12:68)
ERR! at Module._compile (node:internal/modules/cjs/loader:1103:14)
ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
ERR! at Module.load (node:internal/modules/cjs/loader:981:32)
ERR! at Function.Module._load (node:internal/modules/cjs/loader:822:12)
ERR! at Module.require (node:internal/modules/cjs/loader:1005:19) {
ERR! code: 'MODULE_NOT_FOUND',
ERR! requireStack: [
ERR! '/Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/angular/dist/ts3.9/server/angular-cli-webpack-12.2.x.js',
ERR! '/Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/angular/dist/ts3.9/server/framework-preset-angular-cli.js',
ERR! '/Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/core-common/dist/cjs/presets.js',
ERR! '/Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/core-common/dist/cjs/index.js',
ERR! '/Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/core-server/dist/cjs/index.js',
ERR! '/Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/core/dist/cjs/server.js',
ERR! '/Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/core/server.js',
ERR! '/Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/angular/dist/ts3.9/server/index.js',
ERR! '/Users/avrim/etoro-wallet-duplicate/node_modules/@storybook/angular/bin/index.js'
ERR! ]
ERR! }
Now I thought to upgrade to an other version of story book via upgrade command, for instance , to 7.0.8, but it all the time upgraded to the latest version, why?
I use node js 16.14.0 and I prefer to use it.
Can you please help :)
Additional information
No response
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions