You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to install react spectrum with NextJS. I've followed the steps in the Spectrum docs for configuring NextJS. When I attempt to start up the act, I get the error below.
Error: Can't resolve '@react-spectrum/.*' in '/Users/garytalmes/Documents/Projects/nonprofits'
at finishWithoutResolve (/Users/garytalmes/Documents/Projects/nonprofits/node_modules/next-transpile-modules/node_modules/enhanced-resolve/lib/Resolver.js:293:18)
at /Users/garytalmes/Documents/Projects/nonprofits/node_modules/next-transpile-modules/node_modules/enhanced-resolve/lib/Resolver.js:362:15
at /Users/garytalmes/Documents/Projects/nonprofits/node_modules/next-transpile-modules/node_modules/enhanced-resolve/lib/Resolver.js:410:5
at eval (eval at create (/Users/garytalmes/Documents/Projects/nonprofits/node_modules/next-transpile-modules/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
at /Users/garytalmes/Documents/Projects/nonprofits/node_modules/next-transpile-modules/node_modules/enhanced-resolve/lib/Resolver.js:410:5
at eval (eval at create (/Users/garytalmes/Documents/Projects/nonprofits/node_modules/next-transpile-modules/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
at /Users/garytalmes/Documents/Projects/nonprofits/node_modules/next-transpile-modules/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:87:43
at /Users/garytalmes/Documents/Projects/nonprofits/node_modules/next-transpile-modules/node_modules/enhanced-resolve/lib/Resolver.js:410:5
at eval (eval at create (/Users/garytalmes/Documents/Projects/nonprofits/node_modules/next-transpile-modules/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
at /Users/garytalmes/Documents/Projects/nonprofits/node_modules/next-transpile-modules/node_modules/enhanced-resolve/lib/Resolver.js:410:5 {
details: "resolve '@react-spectrum/.*' in '/Users/garytalmes/Documents/Projects/nonprofits'\n" +
' Parsed request is a module\n' +
' using description file: /Users/garytalmes/Documents/Projects/nonprofits/package.json (relative path: .)\n' +
' resolve as module\n' +
' looking for modules in /Users/garytalmes/Documents/Projects/nonprofits/node_modules\n' +
' single file module\n' +
' using description file: /Users/garytalmes/Documents/Projects/nonprofits/package.json (relative path: ./node_modules/@react-spectrum/.*)\n' +
' no extension\n' +
" /Users/garytalmes/Documents/Projects/nonprofits/node_modules/@react-spectrum/.* doesn't exist\n" +
' .js\n' +
" /Users/garytalmes/Documents/Projects/nonprofits/node_modules/@react-spectrum/.*.js doesn't exist\n" +
' .jsx\n' +
" /Users/garytalmes/Documents/Projects/nonprofits/node_modules/@react-spectrum/.*.jsx doesn't exist\n" +
' .ts\n' +
" /Users/garytalmes/Documents/Projects/nonprofits/node_modules/@react-spectrum/.*.ts doesn't exist\n" +
' .tsx\n' +
" /Users/garytalmes/Documents/Projects/nonprofits/node_modules/@react-spectrum/.*.tsx doesn't exist\n" +
' .mjs\n' +
" /Users/garytalmes/Documents/Projects/nonprofits/node_modules/@react-spectrum/.*.mjs doesn't exist\n" +
' .css\n' +
" /Users/garytalmes/Documents/Projects/nonprofits/node_modules/@react-spectrum/.*.css doesn't exist\n" +
' .scss\n' +
" /Users/garytalmes/Documents/Projects/nonprofits/node_modules/@react-spectrum/.*.scss doesn't exist\n" +
' .sass\n' +
" /Users/garytalmes/Documents/Projects/nonprofits/node_modules/@react-spectrum/.*.sass doesn't exist\n" +
" /Users/garytalmes/Documents/Projects/nonprofits/node_modules/@react-spectrum/.* doesn't exist\n" +
" /Users/garytalmes/Documents/Projects/node_modules doesn't exist or is not a directory\n" +
" /Users/garytalmes/Documents/node_modules doesn't exist or is not a directory\n" +
" /Users/garytalmes/node_modules doesn't exist or is not a directory\n" +
" /Users/node_modules doesn't exist or is not a directory\n" +
" /node_modules doesn't exist or is not a directory"
}
One other note:
This error gets thrown on either @spectrum-icons/.* OR @react-spectrum/.* -- whichever comes first in the next.config.js file. I've tried removing the "/.*" part but with no success.
Thanks very much.
The text was updated successfully, but these errors were encountered:
🐛 Bug Report
I'm attempting to install react spectrum with NextJS. I've followed the steps in the Spectrum docs for configuring NextJS. When I attempt to start up the act, I get the error below.
Here are the relevant package.json entries:
Here is the next.config.js:
In pages/_app.js. I have:
import { Provider, defaultTheme } from "@adobe/react-spectrum"
and then later:
And here is the error:
One other note:
This error gets thrown on either @spectrum-icons/.* OR @react-spectrum/.* -- whichever comes first in the next.config.js file. I've tried removing the "/.*" part but with no success.
Thanks very much.
The text was updated successfully, but these errors were encountered: