Closed akunal1 closed 3 years ago
I'm also having the same problem
Apologies, I am a bit occupied as of now, I am aware of the issue on Windows. I will look into it this weekend.
On Sun, Oct 18, 2020 at 8:47 PM akunal1 notifications@github.com wrote:
I'm also having the same problem
If you are looking for installable simple react JS PWA with typescript , have a look into : https://github.com/akunal1/react-js-typescript-boilerplate-pwa
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Atyantik/react-pwa/issues/196#issuecomment-711214177, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACWDN772S3VJITGL2LRY47DSLMBILANCNFSM4SQRXXNA .
-- Tirth Bodawala Founder Atyantik Technologies w: www.atyantik.com e: tirthbodawala@atyantik.com
I have resolved the same issue with writing the chokidar.js file code inside self invocable function. It may works for you also (function(){ var v3Err; try { module.exports = require("chokidar"); return; } catch(e) { v3Err = e; }
var v2Err; try { module.exports = require("watchpack-chokidar2"); return; } catch(e) { v2Err = e; }
throw new Error( "No version of chokidar is available. Tried chokidar@2 and chokidar@3.\n" + "You could try to manually install any chokidar version.\n" + "chokidar@3: " + v3Err + "\n" + "chokidar@2: " + v2Err + "\n" ) }())
Have you modified inside node_module ?
Have you modified inside node_module ?
yes because this is dev dependency for windows user and not found for mac user
face the same issue here. is there anyone knows how to solve this problem?
Hopefully this pull request is accepted at some point in watchpack
... https://github.com/webpack/watchpack/pull/177
Same for me any solution for this?
I have upgraded the required packages, but with lack of windows system, I am not able to reproduce the issue, Also, I have added code to give priority to Chokidar v3 rather than v2 that solves the issues, please let me know if the issue persists.
try this way, it seem like slove my problem
Obviously, we don't have any interest in waiting for people to 'fix' libraries that return at global scope, so using Jest means I need a way to ignore those.
Here's what I ended up doing:
1.Add a "jest" configuration to file package.json:
"jest": {
"transform": {
"^.+\\.js$": "<rootDir>/.jest.transform.js"
}
},
2.Then in the root directory for the project I created file .jest.transform.js and placed this bit to tell Jest to tell Babel to allow return outside of functions:
const babelOptions = {
parserOpts: {
'allowReturnOutsideFunction': true
},
};
module.exports = require('babel-jest').createTransformer(babelOptions);
I hope this helps someone else - I almost walked away from Jest again because of this little nuance!
while I am trying to run the project I am getting bellow error.
Please note : I have not done any changes to project and I am running code from master branch . I tried with yarn also . node: 12.19.0v
ERROR: