-
Notifications
You must be signed in to change notification settings - Fork 41
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
Import is not working in app2 #1
Comments
I am getting the same behavior. @sankaran85 did you find any way around this ? |
I've just cloned the repo for a fresh start and re-tried it. Seems to work for me. |
The problem is pathing, at least on Windows. There is a require in the built index.js of app2 that isn't escaping the slashes in the path correctly and the required module thus can't be found. The \r and \n are getting treated as carriage returns and linefeeds - look at the error message and you can see it. To fix it for me, did a manual 'yarn next build' of app 2 first.
I changed that path to:
In both the TRY and CATCH blocks. Then I did a manual start of the server by running 'yarn next start -p 3001' And poof it worked...haven't figured out yet how to fix it during the build process - but this got it up and running locally. |
I fixed it by adding
|
Hi,
when i try to run the app2 both console and in browser im getting below error. Please help me out.
Cannot find module 'D:extjs-exampleemoteEntry.js'tapp1.nextserverstatic
while loading "./nav" from webpack/container/reference/app1
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at module.exports.exports.modules.webpack/container/reference/app1.module.exports.res (D:\react\nextjs-example\next-mf-blogpost\app2.next\server\pages\index.js:2058:16)
at new Promise ()
at Object.webpack/container/reference/app1 (D:\react\nextjs-example\next-mf-blogpost\app2.next\server\pages\index.js:2052:18)
at webpack_require (D:\react\nextjs-example\next-mf-blogpost\app2.next\server\webpack-runtime.js:24:42)
at handleFunction (D:\react\nextjs-example\next-mf-blogpost\app2.next\server\webpack-runtime.js:173:31)
at D:\react\nextjs-example\next-mf-blogpost\app2.next\server\webpack-runtime.js:192:15 code: 'MODULE_NOT_FOUND' }
event - build page: /next/dist/pages/_error
The text was updated successfully, but these errors were encountered: