Fails with cannot find npm module, despite it being listed in package.json & builds correctly #14075
Unanswered
samdoeswork
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
Trying to setup storybook for angular, one of my components imports an npm module like so:
import * as monaco from "monaco-editor";
The failure is:
Module not found: Error: Can't resolve 'monaco-editor' in 'C:\apps\jaf\client\src\app\components\ui\ui-monaco'
It's definitely in the package.json, and angular builds fine.
Here's tsconfig.app.json:
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "es2020",
"baseUrl": "src",
"types": [],
"experimentalDecorators": true
},
"files": [
"main.ts",
"polyfills.ts"
],
"exclude": [
"/*.stories.ts",
"/.stories."
]
}
Beta Was this translation helpful? Give feedback.
All reactions