Skip to content
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

error during compilation #215

Closed
electather opened this issue Dec 24, 2019 · 1 comment
Closed

error during compilation #215

electather opened this issue Dec 24, 2019 · 1 comment

Comments

@electather
Copy link

electather commented Dec 24, 2019

hi , I tried adding this lib to my project but now when i try to compile my app i get the following error

[ error ] ./pages/_app.tsx
Module not found: Can't resolve '@Components/common/loading' in 'D:\Development\Projects\Ghazalgoo 2.0\web-client\pages'

and this does not seem to be related to this single component. when i deleted the component i got the next component import as an error
Module not found: Can't resolve '@Components/common/modal' in 'D:\Development\Projects\Ghazalgoo 2.0\web-client\pages'
i use typescript and absolute imports in my project
import eg:
import Loading from '@Components/common/loading';

i use the following next.config

const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin");

const withPlugins = require("next-compose-plugins");
const withCSS = require("@zeit/next-css");
const withOffline = require("next-offline");

module.exports = withOffline(
  withPlugins(
    [
      [
        withCSS,
        {
          cssLoaderOptions: {
            url: false
          }
        }
      ]
    ],
    {
      webpack: (config, _options) => {
        if (config.resolve.plugins) {
          config.resolve.plugins.push(new TsconfigPathsPlugin());
        } else {
          config.resolve.plugins = [new TsconfigPathsPlugin()];
        }

        return config;
      },
      target: "serverless"
    }
  )
);

and i just used your now 1 server.js i made no modifications.
ps. whole thing looks very promising. i really hope to get it to work. great job.

@hanford
Copy link
Owner

hanford commented Dec 24, 2019

It might be worth trying to remove next-compose-plugins the two packages are known to not play nice together

#69

@hanford hanford closed this as completed Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants