Skip to content
Advertisement

Tag: module

“object is not extensible” while accessed via `import()` function

I’m importing my JavaScript “module” using the “dynamic import()” call: and, this is the script.js file: By running it, Google Chrome complains that the “object is not extensible” while adding whatever: So, what’s wrong and how to work around the issue? Answer module in the then callback on that import() is the module namespace object for the module. That’s an

Why export default doesn’t work in this simple code?

Why when I use export default on index.js module it says: export ‘appReducers’ (imported as ‘appReducers’) was not found in ‘./reducers/index’ (possible exports: default), but when I change it to module.exports the error go away, why is that? At redux.js in index.js in app.js Answer The problem is in redux.js. Instead of You need What you were doing before was

Import JSON inside NPM Module

I made an npm module, this module export a function that load a json file and then export the result ( a little bit simplified ) The probleme is when I import this module inside another project I have this error : I looks like when I import my module, it try to read the json inside the current directory

Put module into component, angular

I need put a mdbModal into a component, but the component does’nt have a module.ts archive, when try this movement I get: I dont have examples in my collective project, What is the way of can import a module inside a component? I’m relatively new on angular. This is my parent module I dont have problems if I import the

Advertisement