react-scroll-section
react-scroll-section copied to clipboard
ScrollingProvider import declaration error
I am trying to implement it in a nextjs project with ts and I encountered this error when I am running your README(doc) example. I am using yarn
C:\Users\senixcode\Desktop\Projects\my-github-clone\My-web\node_modules\react-scroll-section\lib\index.js:1
import ScrollingProvider from './ScrollingProvider';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:1047:16)
at Module._compile (internal/modules/cjs/loader.js:1097:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Module.require (internal/modules/cjs/loader.js:1019:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.react-scroll-section (C:\Users\senixcode\Desktop\Projects\my-github-clone\My-web\.next\server\pages\index.js:227:18)
at __webpack_require__ (C:\Users\senixcode\Desktop\Projects\my-github-clone\My-web\.next\server\pages\index.js:23:31)
at Module../src/main.tsx (C:\Users\senixcode\Desktop\Projects\my-github-clone\My-web\.next\server\pages\index.js:146:78)
at __webpack_require__ (C:\Users\senixcode\Desktop\Projects\my-github-clone\My-web\.next\server\pages\index.js:23:31)
at Module../pages/index.tsx (C:\Users\senixcode\Desktop\Projects\my-github-clone\My-web\.next\server\pages\index.js:107:67)
at __webpack_require__ (C:\Users\senixcode\Desktop\Projects\my-github-clone\My-web\.next\server\pages\index.js:23:31)
at C:\Users\senixcode\Desktop\Projects\my-github-clone\My-web\.next\server\pages\index.js:91:18
at Object.<anonymous> (C:\Users\senixcode\Desktop\Projects\my-github-clone\My-web\.next\server\pages\index.js:94:10)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
Did you find a solution?
I used the src directly and it worked but I don't really use it anymore.
I have the same error.. Does anyone have a solution?
Hello guys,
This issue should be fixed after the latest update.
I will proceed to close the issue, feel free to re-open the issue in case there is something missing.
same issue while ssr