Quasar1.0beta electron app requiring nightmarejs = cannot find module 'package.json'
-
Hello ,
I’m using quasar 1.0 beta to create and package an electron+vue app , also installed nightmarejs as a dependency.
When requiring nightmare with :const Nightmare = require(“nightmare”);
I get an exception:
Cannot find module ‘C:\Users\Alex\quasarapp\node_modules\nightmare\package.json’
The file ‘C:\Users\Alex\quasarapp\node_modules\nightmare\package.json’ is there, the path is correct.
I have been searching all day and seems to be a problem with webpack, but this goes beyond my skills.
Anyone can help? -
Did you
yarn add nightmare
ornpm install --save nightmare
? -
I considered adding nightmare to the suite of testing harnesses at @quasar/testing - but haven’t gotten around to it yet because there is still so much other stuff to do.
-
I tried both with same result.
I’m not trying to test the app though, I want to scrape a web page. -
Switched to a simple electron + vue boilerplate that has no issues importing nightmare.
Looking forward to get back to Quasar in the future. It looks amazing!!