Closed
Description
Hello,
I am trying to import the module built by the "gulp build" command but it fails.
My Typescript version is 1.8.10.
This is what I have done :
- Create the module :
mkdir my-new-project \
&& cd $_ \
&& yo node-typescript \
&& gulp build \
&& cd ..
- Create the project that will use the module :
mkdir my-requiring-project \
&& cd $_ \
&& mkdir node_modules \
&& cp -r ../my-new-project ./node_modules \
&& echo "import MyNewProject = require('my-new-project')" >> index.ts
- Compile the project :
tsc index.ts
This is the error :
index.ts(1,31): error TS2656: Exported external package typings file '~/dev/nodejs/projects/my-requiring-project/node_modules/my-new-project/lib/my-new-project.d.ts' is not a module. Please contact the package author to update the package definition.
Could you help me to find a way to import the created module into a new project? Any help would be greatly appreciated.
Metadata
Metadata
Assignees
Labels
No labels