Comments (10)
from react-pwa.
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"
)
}())
from react-pwa.
Hopefully this pull request is accepted at some point in watchpack
... webpack/watchpack#177
from react-pwa.
Same for me any solution for this?
from react-pwa.
face the same issue here. is there anyone knows how to solve this problem?
from react-pwa.
I'm also having the same problem
from react-pwa.
Have you modified inside node_module ?
from react-pwa.
Have you modified inside node_module ?
yes because this is dev dependency for windows user and not found for mac user
from react-pwa.
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.
from react-pwa.
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!
from react-pwa.
Related Issues (20)
- not able to start server, installation was successfull HOT 2
- npm start not working HOT 3
- npm start fails on Windows. HOT 3
- build, missing index.html HOT 1
- deployment guide on heroku HOT 1
- 运行报错 HOT 2
- React Confusion HOT 1
- 500 (Internal Server Error) HOT 5
- Issue while npm start HOT 1
- reactpwa.com - host access Error 520 HOT 2
- chokidar.js 'return' outside of function HOT 2
- How To Build APK File For Android & IOS ? HOT 1
- Getting CSS problem on windows 10 OS HOT 1
- There is not sufficient document to start project HOT 3
- npm start on your homepage should be npm run dev
- npm run dev failed to start - Could not find a declaration file for module '@reactpwa/core/start HOT 1
- How can i change the html and body class and add stuff to the head element
- Documentation update. HOT 1
- How Can we configure tailwindCSS in PawJS version ^3.0.2-beta.17?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-pwa.