Support Forums

Works locally but Cannot resolve dependency in netlify

my sites_name sleepy-mccarthy-92472e
my github GitHub - wx85745997/javascript-everywhere-study-notes

the path is notedly/web/

Build settings



Base directory:notedly/web

Build command:npm run deploy:src

Publish directory:notedly/web/dist

Deploy log visibility:Logs are public


the error log

 /opt/build/repo/notedly/web/src/pages/note.js:6:17: Cannot resolve dependency '../components/Note' at '/opt/build/repo/notedly/web/src/components/Note'


"deploy:src": "parcel build src/index.html --public-url ./",

it works in my locally

thank you can help me

Welcome to the forums @wx85745997

From the log you have the line

import Note from '../components/Note'

however your file is note.js. Note the build (as with *nix systems in general) is case-sensitive. Change note.js to Note.js and your build should work (assuming no other issues arise.)

note.js is a page
Note.js is a component

import Note from '../components/Note'

i want import the component
so i think its right

You are importing the component Note from the file ../components/Note (ie. ../components/Note.js). However the file ../components/Note.js does not exist, but ../components/note.js does. Change the filename note.js to Note.js.

thank you very much I know how to fix it

i see /components/Note.js in vscode
but its /components/note.js in github