-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module not found: Error: Can't resolve '.' #1568
Comments
I've got exactly the same issue here in my project, will keep you updated if I find some solution on this. |
Ran into a similar issue when trying to convert my recently migrated Angular 7 app to universal. |
This was mistaken, ignore. |
@JSMike Doesn't seems to change anything, tried to change baseUrl in my project but this issue is still there.. I found a temporary solution to fix this (at least this is working with my project), just start Then you can run |
I have the same problem trying to implement SSR on a 6.1 angular proyect. I'll try to start from the universal-starter project and add all the features one by one.. |
This issue is related to the utils/tree.js file. It imports '.' . I don't know why. If you delete this line, then the app should build on universal. |
Looks like it's an issue with tree.ts it's importing @ericel Deleting the line shouldn't really "fix" the error unless you're not actually using the tree code in your project, you'll get a runtime error. The fix is to update the @marjan-georgiev is this something you can fix real quick? at my current job I can't submit a PR without a bunch of paperwork. FYI, I searched the project, this is the only file that imports from |
Just downgrade the version of ngx-datatable from |
Any update on this? |
@jedmarcnocum I have the fix outlined in my post, due to the company I work for I can't submit the PR right now, trying to get permission. Lots of annoying legal/paperwork stuff. Feel free to implement the change and push a PR if you can. |
Merged #1646 |
@marjan-georgiev Is there a plan to do a release for this? |
Released in 15.0.0 |
I'm submitting a ... (check one with "x")
Current behavior
it is working fine if build it using ng serve and ng build --prod. But I am facing issues when I build it for server side rendering with angular universal. I am using following commands to build
ERROR in ./dist/server/main.js
Module not found: Error: Can't resolve '.' in 'C:\Users\me\Desktop\example\dist\server'
@ ./dist/server/main.js 96:17-29
@ ./server.ts
C:\Users\me\Desktop\example\dist\server.js:54955
module.exports = webpack_require(!(function webpackMissingModule() { var e = new Error("Cannot find module '.'"); e.code = 'MODULE_NOT_FOUND'; throw e; }()));
^
Error: Cannot find module '.'
at webpackMissingModule (C:\Users\me\Desktop\example\dist\server.js:54955:82)
at Object.. (C:\Users\me\Desktop\example\dist\server.js:54955:158)
at webpack_require (C:\Users\me\Desktop\example\dist\server.js:54879:30)
at Object../node_modules/@swimlane/ngx-datatable/release/utils/tree.js (C:\Users\me\Desktop\example\dist\server.js:62913:10)
at webpack_require (C:\Users\me\Desktop\example\dist\server.js:54879:30)
at Object../node_modules/@swimlane/ngx-datatable/release/utils/index.js (C:\Users\me\Desktop\example\dist\server.js:62194:10)
at webpack_require (C:\Users\me\Desktop\example\dist\server.js:54879:30)
at Object../node_modules/@swimlane/ngx-datatable/release/components/header/header-cell.component.js (C:\Users\me\Desktop\example\dist\server.js:59818:15)
at webpack_require (C:\Users\me\Desktop\example\dist\server.js:54879:30)
at Object../node_modules/@swimlane/ngx-datatable/release/components/header/header-cell.component.ngfactory.js (C:\Users\me\Desktop\example\dist\server.js:60109:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! example@0.0.0 serve:ssr:
node dist/server
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the example@0.0.0 serve:ssr 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! C:\Users\me\AppData\Roaming\npm-cache_logs\2018-10-06T07_02_52_121Z-debug.log
Expected behavior
Create ssr build without errors.
Reproduction of the problem
I have created a test project to reproduce the issue. Following is the github link.
https://github.com/Muhammad-Soban/ngx-datatable-ssr-issue.git
Please tell us about your environment:
Operating system: Windows 10
IDE: Webstorm
Package manager: npm
package.json:
Table version:
"@swimlane/ngx-datatable": "^13.1.0"
Angular version:
Angular 6.1.0
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
The text was updated successfully, but these errors were encountered: