8000 renderer doesn't compile · Issue #41 · notable/notable · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

renderer doesn't compile #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

Closed
dps opened this issue Dec 27, 2018 · 23 comments
Closed

renderer doesn't compile #41

dps opened this issue Dec 27, 2018 · 23 comments
Labels
bug Something isn't working
Milestone

Comments

@dps
Copy link
Contributor

dps commented Dec 27, 2018

This is a DUP of Issue #6 which is marked closed, but I have verified that it's still a problem. Any ideas?

Mac OS X 10.14

$ npm run svelto:dev

> notable@1.0.0 svelto:dev /Users/dps/notable
> svelto build --env development

followed by

$ npm run dev

produces the error:

  ERROR in ./src/renderer/render.tsx
  Module not found: Error: Can't resolve '@static/css/notable.min.css' in '/Users/dps/notable/src/renderer'
   @ ./src/renderer/render.tsx 37:0-37
   @ ./src/renderer/index.ts
   @ multi (webpack)-dev-server/client?http://localhost:9080 (webpack)/hot/dev-server.js css-hot-loader/hotModuleReplacement ./src/renderer/index.ts
  
  ERROR in ./src/renderer/render.tsx
  Module not found: Error: Can't resolve '@static/javascript/notable.min.js' in '/Users/dps/notable/src/renderer'
   @ ./src/renderer/render.tsx 38:0-43
   @ ./src/renderer/index.ts
   @ multi (webpack)-dev-server/client?http://localhost:9080 (webpack)/hot/dev-server.js css-hot-loader/hotModuleReplacement ./src/renderer/index.ts
@leiy3
Copy link
leiy3 commented Dec 27, 2018

I am also seeing the same issue on OSX 10.14.

@RomanKornev
Copy link
Contributor

Also doesn't work on Windows 10 x64 1803.

@fabiospampinato
Copy link
Member

There should definitely be more output generated by npm run svelto:dev, or at least an error. I'll look into that.

@fabiospampinato fabiospampinato added the bug Something isn' 8000 t working label Dec 27, 2018
@dps
Copy link
Contributor Author
dps commented Dec 27, 2018

Thanks - let me know if I can help run any debug stuff on my system for you.

@fabiospampinato
Copy link
Member

@dps yes actually, can you post the output of the following command: npx svelto --env development --fresh --verbose?

@dps
Copy link
Contributor Author
dps commented Dec 27, 2018

It produces no output at all:

$ npx svelto --env development --fresh --verbose
$

@dps
Copy link
Contributor Author
dps commented Dec 27, 2018

same result when executing npx -c "svelto --env development --fresh --verbose" if that is also of interest.

@RomanKornev
Copy link
Contributor

@fabiospampinato Here is my output on Windows 10 x64 1803:

$ npx svelto --env development --fresh --verbose
The system cannot find the path specified.

@fabiospampinato
Copy link
Member
fabiospampinato commented Dec 27, 2018

🤔 that's strange. I don't have time for fixing this today, but I consider it a pretty important issue as without it contributing can be challenging. Until this is fixed I've published the compiled css/js into the repo, here. you should now be able to start-up the app without needing to compile Svelto yourself.

@fabiospampinato
Copy link
Member

If anyone wants to help debugging this I would recommend attaching the debugger in node_modules/svelto/bin/index.js, svelto uses pacco under the hood so my guess would be that the problem is there somewhere.

@dps
Copy link
Contributor Author
dps commented Dec 27, 2018

Looking...

Changed the pacco invocation to something which logs the output:

execa ( 'pacco', args, opts ).then(result => {
  console.log(result.stdout);
});

Produces:

$ npx svelto --env development --fresh --verbose
(node:39439) UnhandledPromiseRejectionWarning: Error: spawn pacco ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
    at onErrorNT (internal/child_process.js:407:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
    at findNodeScript.then.existing (/usr/local/lib/node_modules/npm/node_modules/libnpx/index.js:268:14)
(node:39439) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:39439) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@dps
Copy link
Contributor Author
dps commented Dec 27, 2018

So possibly as simple as pacco not being listed as a dependency? It's not in my node_modules.

@dps
Copy link
Contributor Author
dps commented Dec 27, 2018

Just to confirm - doing npm install pacco followed by npm run dev resulted in a successful compile.

@fabiospampinato
Copy link
Member

@dps Thanks very much for the time you put into this, the issue seems that I'm declaring pacco as a dev dependency, fix coming soon!

@RomanKornev
Copy link
Contributor
RomanKornev commented Dec 28, 2018

Issue is still present on Windows even after installing pacco.
$ npm run svelto:dev fails to compile.
#18 is blocked as a result.

@gunt3001
Copy link
gunt3001 commented Dec 28, 2018

I can confirm the issue is fixed once pacco is installed, on macOS, but..

Issue is still present even after installing pacco.

I'm assuming @RomanKornev is referring to Windows, in which I can also confirm I'm still getting The system cannot find the path specified. when running svelto on Windows. Probably a separate cause...

@fabiospampinato fabiospampinato added this to the Next milestone Dec 28, 2018
@fabiospampinato
Copy link
Member

We are now including pacco as a proper dependency.

I can also reproduce "The system cannot find the path specified." on Windows, fix (hopefully) coming soon.

@fabiospampinato
Copy link
Member
fabiospampinato commented Jan 2, 2019

There's an issue with the > character.

I can't spawn pacco with the following arguments under Windows:

const args = [ 'pacco', 'config', '--config', '{"browsers":["ie >= 9"]}' ];

If I remove the > character it works. I tried escaping it but I always get the same error.

I could base64 encode JSON objects to workaround this problem, but I'd rather find a proper fix, if anyone has any idea how to fix this please do let me know.

@gunt3001
Copy link
gunt3001 commented Jan 2, 2019

It seems on Windows > can be escaped with a triple ^ like so "ie ^^^>= 10". With that I could get it to compile on Windows.

I still feel like there could be a better solution, but it's an option.

@fabiospampinato
Copy link
Member

It seems on Windows > can be escaped with a triple ^ like so "ie ^^^>= 10"

Seriously? Another reason for hating Windows, what is that syntax 😨 @gunt3001 do you know where this is documented? I couldn't find anything particularly interesting by searching for "triple caret escape" on Google.

Anyway this problem should be fixed now, there were a few issues under Windows that should now be resolved.

@RomanKornev
Copy link
Contributor

If anyone still has issues compiling:
Failed to load "notable\eyJicm93c2VycyI6WyJpZSA..." - just re-clone the repository again.

@gunt3001
Copy link
gunt3001 commented Jan 3, 2019

Seriously? Another reason for hating Windows, what is that syntax 😨 @gunt3001 do you know where this is documented? I couldn't find anything particularly interesting by searching for "triple caret escape" on Google.

The escape character is actually just one caret ^. However in some cases the command can get parsed multiple times, so you need to escape the caret itself. This SO answer explains it a bit (and escape characters in general).

@fabiospampinato
Copy link
Member

@gunt3001 thanks for the link! Issues like this shouldn't happen in the future as we are now encoding JSON objects (which can contain basically any character) as base64 for more reliable compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

5 participants
0