wordpress-clients / hybrid

[I don't have time to work on this anymore. Use at your own risk] Build WordPress based PWA, iOS, Android & Windows phones apps in minutes!
MIT License
1.02k stars 348 forks source link

Cannot find module '../config.default.cson'. #394

Open ghost opened 6 years ago

ghost commented 6 years ago

I am getting this error when I run ionic serve. The config.default.cson is in the /src file and has not been touched. I just cant seem to figure out what is wrong.

Typescript error Cannot find module '../config.default.cson'.

myapp/src/providers/config.ts

line 6. import { defaultConfig } from '../config.default.cson';

here is my config.ts file:

import { Injectable } from '@angular/core';
import deepExtend from 'deep-extend';
import _get from 'lodash/get';
import debug from 'debug';

import { defaultConfig } from '../config.default.cson';

const configOverwrite = require('../../config/config.cson');

const log = debug('Config');

const rawConfig = deepExtend(defaultConfig, configOverwrite);

@Injectable()
export class Config {

--

Ionic Framework: 3.8.0 Ionic App Scripts: 3.1.2 Angular Core: 4.4.4 Angular Compiler CLI: 4.4.4 Node: 8.9.4 OS Platform: Windows 7 Navigator Platform: Win64 User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0

shprink commented 6 years ago

Hello

the build passes and the demo works https://wordpress-clients.github.io meaning it is fine on UNIX (fine on macOS as well).

I have not tested on Windows, maybe there is problem with relative paths?

ghost commented 6 years ago

Yeah it is a windows problem. I have installed a ubuntu VM and created the app that way. I also have an error pushing the app to ionic pro via ionic link. Shall i create a new issue for this??

shprink commented 6 years ago

Yes please I do not use Ionic Pro, I have no idea how to set it up but I would be happy to try if you explain what you do in a ticket. Thanks