Issue
I found three.js project on codesandbox and I'm having trouble getting it to work locally.
On codesandbox it works normally https://codesandbox.io/s/github/jmswrnr/website-examples/tree/master/3d-header/final-result but when I downloaded the code from https://github.com/jmswrnr/website-examples/tree/master/3d-header/final-result and typed npm ci
and then npx parcel index.html --open
to start the server I got some errors which I couldn't fix. I also tried to run this project using webpack, parcel and vitejs and it also failed. I don't know what I am doing wrong, but I think there is a problem with importing modules. How can I run this project locally?
Solution
TLDR;
npm install --save @babel/compat-data
npm install --save parcel-bundler@1.12.3
npm start
FYI:
Please make sure to thoroughly Google the error before approaching Stackoverflow.
There were two errors thrown:
Cannot find module '/website-examples/3d-header/final-result/node_modules/@babel/compat-data/data/corejs3-shipped-proposals'
and
Cannot read properties of undefined (reading 'length') at lineCounter (/website-examples/3d-header/final-result/node_modules/parcel-bundler/src/utils/lineCounter.js:3:30)
Just Googling for parcel lineCounter
led me to the Github issue as the first result: https://github.com/parcel-bundler/parcel/issues/2957
Answered By - Deep Answer Checked By - Willingham (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.