Cannot find module on build
See original GitHub issueSince our upgrade to angular 9, we receive the following errors when trying to build the application:
ERROR in node_modules/pusher-js/types/src/core/pusher.d.ts:1:29 - error TS2307: Cannot find module 'runtimes/interface'.
1 import AbstractRuntime from 'runtimes/interface';
~~~~~~~~~~~~~~~~~~~~
node_modules/pusher-js/types/src/runtimes/interface.d.ts:1:32 - error TS2307: Cannot find module 'core/auth/auth_transports'.
1 import { AuthTransports } from 'core/auth/auth_transports';
~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pusher-js/types/src/runtimes/interface.d.ts:2:31 - error TS2307: Cannot find module 'core/timeline/timeline_transport'.
2 import TimelineTransport from 'core/timeline/timeline_transport';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pusher-js/types/src/runtimes/interface.d.ts:3:18 - error TS2307: Cannot find module 'core/http/ajax'.
3 import Ajax from 'core/http/ajax';
~~~~~~~~~~~~~~~~
node_modules/pusher-js/types/src/runtimes/interface.d.ts:4:26 - error TS2307: Cannot find module 'core/reachability'.
4 import Reachability from 'core/reachability';
~~~~~~~~~~~~~~~~~~~
node_modules/pusher-js/types/src/runtimes/interface.d.ts:5:29 - error TS2307: Cannot find module 'core/transports/transports_table'.
5 import TransportsTable from 'core/transports/transports_table';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pusher-js/types/src/runtimes/interface.d.ts:6:20 - error TS2307: Cannot find module 'core/socket'.
6 import Socket from 'core/socket';
~~~~~~~~~~~~~
node_modules/pusher-js/types/src/runtimes/interface.d.ts:7:25 - error TS2307: Cannot find module 'core/http/http_factory'.
7 import HTTPFactory from 'core/http/http_factory';
~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pusher-js/types/src/runtimes/interface.d.ts:8:25 - error TS2307: Cannot find module 'core/http/http_request'.
8 import HTTPRequest from 'core/http/http_request';
~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pusher-js/types/src/runtimes/interface.d.ts:9:20 - error TS2307: Cannot find module 'core/pusher'.
9 import Pusher from 'core/pusher';
~~~~~~~~~~~~~
node_modules/pusher-js/types/src/runtimes/interface.d.ts:11:22 - error TS2307: Cannot find module 'core/strategies/strategy'.
11 import Strategy from 'core/strategies/strategy';
~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! snowhat@0.0.0 build:client-and-server-bundles: `ng build --configuration=test && ng run snowhat:server --bundleDependencies all`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the snowhat@0.0.0 build:client-and-server-bundles script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/deployer/.npm/_logs/2020-02-12T09_35_44_319Z-debug.log
Any clue what causes this and how we can make it work?
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
How do I resolve "Cannot find module" error using Node.js?
This happens when a first npm install has crashed for some reason (SIGINT of npm), or that the delay was too long, or...
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
How to Fix the "cannot find module" Error · delete the node modules folder by running rm -rf node_modules · delete package.lock.json file...
Read more >How to resolve "Cannot find module" error in Node - Sabe.io
The Cannot find module error is a common error that usually happens when dependencies are not installed. Once you install your dependencies and ......
Read more >Cannot find module 'X' error in Node.js | bobbyhadz
To solve the "Cannot find module" error in Node.js, make sure to install the package from the error message if it's a third-party...
Read more >How to fix npm cannot find module error - Nathan Sebhastian
The cannot find module error occurs because npm cannot find the module required by the index.js file. In this case, the axios module....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just updated to
5.1.1
and it works without any issues in my project 😃Thank you very much!
Just had the same issue and I can confirm as well that the branch
fix-ts-declarations
works!